Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group 8 - Manual World - Development #108

Closed
wants to merge 87 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
fddb957
added mkdocs
amantham20 Oct 10, 2023
07e4092
site page
amantham20 Oct 10, 2023
389303c
Update mkdocs.yml
amantham20 Oct 10, 2023
c312c69
updated core
amantham20 Oct 10, 2023
7b2907f
Update .gitignore and removed files
amantham20 Oct 10, 2023
dda75d6
Merge branch 'MSU-CSE491:main' into main
Ytesgn Oct 30, 2023
9e17231
Merge remote-tracking branch 'origin/main'
carrgran Nov 1, 2023
6525613
Added ability to reset player after death
Scor23 Nov 1, 2023
5d2ec2d
Merge remote-tracking branch 'upstream/development'
carrgran Nov 1, 2023
2266547
Merge remote-tracking branch 'upstream/development'
carrgran Nov 1, 2023
6084308
Change some couts to Notify().
carrgran Nov 8, 2023
b5b2381
Changed resetting of interface
Scor23 Nov 13, 2023
eb79ee2
Merge branch 'MSU-CSE491:main' into main
Scor23 Nov 13, 2023
ab10e85
Merge pull request #23 from amantham20/GPLoop-amanXSimon-CGPA
amantham20 Nov 14, 2023
fb601cd
Merge branch 'MSU-CSE491:main' into main
amantham20 Nov 14, 2023
a68d27e
Added an AddMove and RemoveMove function
Ytesgn Nov 15, 2023
165af7b
Use Notify() instead of cout, fixed some spacing issues.
carrgran Nov 15, 2023
678921f
Fixed error after merge.
carrgran Nov 15, 2023
12c45bf
Changed remaining cout to Notify()
carrgran Nov 15, 2023
88e2e59
Merge branch 'MSU-CSE491:main' into main
carrgran Nov 20, 2023
f113a8e
Added new items and changed notification message.
carrgran Nov 20, 2023
e65b04c
Changed items to use ItemBase class
Scor23 Nov 20, 2023
70d8203
Merge branch 'main' of https://github.com/Ytesgn/cse_491_group_8_fork
Scor23 Nov 20, 2023
6f3b071
Merge branch 'MSU-CSE491:main' into main
Scor23 Nov 20, 2023
039badc
Fixed main cmake file and added large grid
Scor23 Nov 20, 2023
78c987d
Merge branch 'GPLoop-amanXSimon-CGPA'
amantham20 Nov 21, 2023
4b6f50a
Made a separate function for healing actions
Ytesgn Nov 21, 2023
42be971
Created a FindItem function.
carrgran Nov 22, 2023
8db63ae
Updated boat finding.
carrgran Nov 22, 2023
adf1b8d
Add HealAction function. Check if Health Potion exists.
carrgran Nov 22, 2023
61c0a57
Added heal action and stats action
Scor23 Nov 22, 2023
a5de9c6
Merge branch 'main' of https://github.com/Ytesgn/cse_491_group_8_fork
Scor23 Nov 22, 2023
5c195ad
Removed duplicate function
Scor23 Nov 22, 2023
639291e
Added actions for Axe and Boat Use
Scor23 Nov 22, 2023
0987cc2
Changed stat display and completed action for axe
Scor23 Nov 24, 2023
ff08a3b
Added boat action functionality
Scor23 Nov 25, 2023
fba6c37
Merge branch 'GPLoop-amanXSimon-CGPA'
amantham20 Nov 25, 2023
72c0c5a
Merge branch 'mkdocs-main-documentation' into main
amantham20 Nov 25, 2023
cca4575
Revert "Merge branch 'mkdocs-main-documentation' into main"
amantham20 Nov 25, 2023
dcb825c
Adding code for two portals to medium grid
lmgarvey Nov 26, 2023
3658db8
Adding portals to medium grid
lmgarvey Nov 26, 2023
22c42a8
Forgot portal ids
lmgarvey Nov 26, 2023
9f4ec72
Start to refactor item dropping and battling
Scor23 Nov 27, 2023
42575d3
Added tests for agent healing.
carrgran Nov 27, 2023
5719501
Merge branch 'development'
amantham20 Nov 27, 2023
04903c7
Added tests for finding items for an agent.
carrgran Nov 27, 2023
e4aea6f
Modified test cases for Item finding.
carrgran Nov 27, 2023
7c9fe46
Break up the MutateHeader function
ssitu Nov 27, 2023
3b8a97e
Changed to use SIZE_MAX.
carrgran Nov 27, 2023
76a7cbe
Merge branch 'development'
amantham20 Nov 27, 2023
f12ede3
Move battling to attack action
Scor23 Nov 27, 2023
4353bf5
Added import of genotypes
ssitu Nov 27, 2023
8db4723
Merge branch 'GPLoop-amanXSimon-CGPA' of https://github.com/amantham2…
amantham20 Nov 28, 2023
af449da
Merge branch 'main' into GPLoop-amanXSimon-CGPA
amantham20 Nov 28, 2023
6f279a1
Abracadabra! Warnings Vanish! 🎩🐇 Pulled a rabbit out of my hat and ma…
amantham20 Nov 28, 2023
6ea5d5a
simplified c_str() behavior
amantham20 Nov 28, 2023
7eb8ef1
Added dropping items when defeated tests.
carrgran Nov 28, 2023
d61ff62
Added tests for LookAhead.
carrgran Nov 28, 2023
fa5c84e
Fixed UB, added serialization, prob more stuff
Nov 28, 2023
eb0653f
Merge branch 'Jason's-workspace'
Nov 28, 2023
adc397d
changed the metaDatafilename
amantham20 Nov 28, 2023
7f0a9ad
Merge branch 'Jason's-workspace' into GPLoop-amanXSimon-CGPA
amantham20 Nov 28, 2023
e4ff704
comments
amantham20 Nov 28, 2023
6de1125
changed the training seed
amantham20 Nov 29, 2023
83c37b5
Making the combat moves and adding a battling state. The battling is …
Ytesgn Nov 29, 2023
627f190
Merge pull request #98 from Gaya1858/main
Felicivi Nov 30, 2023
2dcee91
Bug fixing
Scor23 Nov 30, 2023
d2334b4
Merge branch 'GPLoopXWorlds' into main
amantham20 Nov 30, 2023
61a6255
Revert "Bug fixing"
Scor23 Nov 30, 2023
177e81e
Revert "Merge branch 'GPLoopXWorlds' into main"
Scor23 Nov 30, 2023
edd9573
Fixed accidental reverted changes
Scor23 Nov 30, 2023
370130d
Merge branch 'MSU-CSE491:main' into main
Scor23 Nov 30, 2023
3d9bb3a
Updated item dropping and agent removal
Scor23 Dec 2, 2023
17058d9
Optimized battle function call and agent notity
Scor23 Dec 2, 2023
638edf9
Adding portals to large grid
lmgarvey Dec 4, 2023
9a56652
remove function and changed deleted property
Scor23 Dec 4, 2023
b338066
update grids and cmake for interface
Scor23 Dec 5, 2023
eab7e0f
Merge branch 'MSU-CSE491:development' into development
Scor23 Dec 5, 2023
b60c250
Merge branch 'MSU-CSE491:development' into development
Scor23 Dec 6, 2023
2f4d77f
Added some agents and items, updated grid to be large grid.
carrgran Dec 6, 2023
c82cae8
Updated boat positioning.
carrgran Dec 6, 2023
c55686c
Updated agent positioning to fit large grid.
carrgran Dec 6, 2023
73f3b3d
Merge branch 'MSU-CSE491:development' into development
Scor23 Dec 6, 2023
ac64597
Updated agent positioning to fit large grid.
carrgran Dec 6, 2023
3b1d35c
Merge branch 'main' into development
Scor23 Dec 6, 2023
06c0891
Add inventory for agents
Scor23 Dec 6, 2023
f2156cf
Merge branch 'development' of https://github.com/Ytesgn/cse_491_group…
Scor23 Dec 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,3 @@ cmake-build-*/

#mac
.DS_Store

#savedata/ #issues with xml save location

savedata/GPAgent/*.xml
#AgentData_*.xml


site
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
[submodule "third_party/SFML"]
path = third_party/SFML
url = https://github.com/SFML/SFML.git
[submodule "third_party/tinyxml2"]
path = third_party/tinyxml2
url = https://github.com/leethomason/tinyxml2.git
217 changes: 63 additions & 154 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,182 +6,91 @@ project(CSE_491)
# For now, default to building both the main app and tests
set(BUILD_MAIN 1)
set(BUILD_TESTS 1)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Test")
set(BUILD_MAIN 0)
set(BUILD_TESTS 1)
endif ()
if("${CMAKE_BUILD_TYPE}" STREQUAL "Test")
set(BUILD_MAIN 0)
set(BUILD_TESTS 1)
endif()

# Create a function to make .cmake files simpler
function(add_source_to_target TARGET_NAME SOURCE_PATH)
message(STATUS "Loading source: ${SOURCE_PATH}")
target_sources(${TARGET_NAME}
PRIVATE ${CMAKE_SOURCE_DIR}/${SOURCE_PATH}
)
message(STATUS "Loading source: ${SOURCE_PATH}")
target_sources(${TARGET_NAME}
PRIVATE ${CMAKE_SOURCE_DIR}/${SOURCE_PATH}
)
endfunction()

# Set the necessary C++ flags, some of which are configuration-specific
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wcast-align -Winfinite-recursion -Wnon-virtual-dtor -Wnull-dereference -Woverloaded-virtual -pedantic")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wcast-align -Winfinite-recursion -Wnon-virtual-dtor -Wnull-dereference -Woverloaded-virtual -pedantic")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
set(CMAKE_CXX_FLAGS_COVERAGE "-O2 -g -fcoverage-mapping -fprofile-instr-generate -fprofile-arcs")


# Place all executables in the executable directory
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/executable)

# Move assets to build directory
file(COPY ./assets DESTINATION ${CMAKE_CURRENT_BINARY_DIR})


#option(BUILD_CLANG_LLVM "Build with clang for LLVM" OFF)
option(SANITIZE_MEMORY "Build with sanitizers for GP" OFF)
if (SANITIZE_MEMORY)

set(BUILD_MAIN 0)
set(BUILD_TESTS 0)

set(CMAKE_CXX_COMPILER "/opt/homebrew/opt/llvm/bin/clang++")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=memory")

set(XML_SRC_DIR third_party/tinyxml2)
set(XML_BUILD_DIR xml_build)
add_subdirectory(${XML_SRC_DIR} ${XML_BUILD_DIR})

#added the executable
add_executable(gp_train_main source/gp_train_main.cpp)

#linking the targets
target_sources(gp_train_main PRIVATE source/core/Entity.cpp)
target_include_directories(gp_train_main
PRIVATE ${CMAKE_SOURCE_DIR}/source/core
${CMAKE_SOURCE_DIR}/source/Agents
)
target_link_libraries(gp_train_main
PRIVATE tinyxml2
PRIVATE pthread
)


endif ()





# Build the gp_train_main executable, if requested without SFML and Catch2
option(BUILD_GP_ONLY "Build only gp_main.cpp" OFF)
if (BUILD_GP_ONLY)
set(BUILD_MAIN 0)
set(BUILD_TESTS 0)

# Configure all of tinyxml2
set(XML_SRC_DIR third_party/tinyxml2)
set(XML_BUILD_DIR xml_build)
add_subdirectory(${XML_SRC_DIR} ${XML_BUILD_DIR})

#added the executable
add_executable(gp_train_main source/gp_train_main.cpp)

#linking the targets
target_sources(gp_train_main PRIVATE source/core/Entity.cpp)
target_include_directories(gp_train_main
PRIVATE ${CMAKE_SOURCE_DIR}/source/core
${CMAKE_SOURCE_DIR}/source/Agents
)
target_link_libraries(gp_train_main
PRIVATE tinyxml2
PRIVATE pthread
)

endif ()


# Build the main application executables, if requested
if (${BUILD_MAIN})
# line to set santizers
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=[sanitizer]")
# can be set to address, undefined, thread, memory, or leak
if(${BUILD_MAIN})

# Configure all of SFML
set(SFML_SRC_DIR third_party/SFML)
set(SFML_BUILD_DIR sfml_build)
add_subdirectory(${SFML_SRC_DIR} ${SFML_BUILD_DIR})

# Find all the main files for the various applications
# Currently this means any *.cpp file in the root of source
file(GLOB EXE_SOURCES CONFIGURE_DEPENDS RELATIVE ${CMAKE_SOURCE_DIR}/source source/*.cpp)
message(STATUS "List of main files to build: ${EXE_SOURCES}")

# Loop through each executable and build it!
foreach(EXE_SOURCE ${EXE_SOURCES})
# Rip the .cpp off the end of the string
string(REPLACE ".cpp" "" EXE_NAME ${EXE_SOURCE})
# Create list of source files (currently just the one .cpp file)
# Create executable and link to includes / libraries
add_executable(${EXE_NAME} ${CMAKE_SOURCE_DIR}/source/${EXE_SOURCE})
target_include_directories(${EXE_NAME}
PRIVATE ${CMAKE_SOURCE_DIR}/source
)
target_link_libraries(${EXE_NAME}
PRIVATE sfml-window sfml-audio sfml-graphics sfml-system sfml-network
)
if(EXISTS ${CMAKE_SOURCE_DIR}/source/${EXE_NAME}.cmake)
message(STATUS "Loading ${EXE_NAME}.cmake")
include(${CMAKE_SOURCE_DIR}/source/${EXE_NAME}.cmake)
else()
message(WARNING "Cannot find ${EXE_NAME}.cmake")
endif()
endforeach()
endif()

# Configure all of SFML
# Build the test executables, if requested
if(${BUILD_TESTS})

# Configure Catch
set(CATCH_SRC_DIR third_party/Catch2)
set(CATCH_BUILD_DIR catch_build)
add_subdirectory(${CATCH_SRC_DIR} ${CATCH_BUILD_DIR})

# Configure only the networking portion of SFML
if(NOT ${BUILD_MAIN})
set(SFML_BUILD_WINDOW FALSE)
set(SFML_BUILD_GRAPHICS FALSE)
set(SFML_BUILD_AUDIO FALSE)
set(SFML_SRC_DIR third_party/SFML)
set(SFML_BUILD_DIR sfml_build)
add_subdirectory(${SFML_SRC_DIR} ${SFML_BUILD_DIR})
endif()

# Setup CTest
include(CTest)
enable_testing()

#configure the xml library
set(XML_SRC_DIR third_party/tinyxml2)
set(XML_BUILD_DIR xml_build)
add_subdirectory(${XML_SRC_DIR} ${XML_BUILD_DIR})


# Find all the main files for the various applications
# Currently this means any *.cpp file in the root of source
file(GLOB EXE_SOURCES CONFIGURE_DEPENDS RELATIVE ${CMAKE_SOURCE_DIR}/source source/*.cpp)
message(STATUS "List of main files to build: ${EXE_SOURCES}")



# Loop through each executable and build it!
foreach (EXE_SOURCE ${EXE_SOURCES})
# Rip the .cpp off the end of the string
string(REPLACE ".cpp" "" EXE_NAME ${EXE_SOURCE})
# Create list of source files (currently just the one .cpp file)
# Create executable and link to includes / libraries
add_executable(${EXE_NAME} ${CMAKE_SOURCE_DIR}/source/${EXE_SOURCE} ${CMAKE_SOURCE_DIR}/source/core/Entity.cpp)
target_include_directories(${EXE_NAME}
PRIVATE ${CMAKE_SOURCE_DIR}/source
)
target_link_libraries(${EXE_NAME}
PRIVATE sfml-window sfml-audio sfml-graphics sfml-system sfml-network
)

target_link_libraries(${EXE_NAME}
PRIVATE tinyxml2
)

if (EXISTS ${CMAKE_SOURCE_DIR}/source/${EXE_NAME}.cmake)
message(STATUS "Loading ${EXE_NAME}.cmake")
include(${CMAKE_SOURCE_DIR}/source/${EXE_NAME}.cmake)
else ()
message(WARNING "Cannot find ${EXE_NAME}.cmake")
endif ()
endforeach ()
endif ()

# Build the test executables, if requested
if (${BUILD_TESTS})

# Configure Catch
set(CATCH_SRC_DIR third_party/Catch2)
set(CATCH_BUILD_DIR catch_build)
add_subdirectory(${CATCH_SRC_DIR} ${CATCH_BUILD_DIR})


# Configure only the networking portion of SFML
if (NOT ${BUILD_MAIN})
set(SFML_BUILD_WINDOW FALSE)
set(SFML_BUILD_GRAPHICS FALSE)
set(SFML_BUILD_AUDIO FALSE)
set(SFML_SRC_DIR third_party/SFML)
set(SFML_BUILD_DIR sfml_build)
add_subdirectory(${SFML_SRC_DIR} ${SFML_BUILD_DIR})

set(XML_SRC_DIR third_party/tinyxml2)
set(XML_BUILD_DIR xml_build)
add_subdirectory(${XML_SRC_DIR} ${XML_BUILD_DIR})


endif ()


# Setup CTest
include(CTest)
enable_testing()

# Tunnel into test directory CMake infrastructure
add_subdirectory(tests)
endif ()
# Tunnel into test directory CMake infrastructure
add_subdirectory(tests)
endif()
29 changes: 0 additions & 29 deletions assets/grids/default_maze2.grid

This file was deleted.

9 changes: 0 additions & 9 deletions assets/grids/empty_maze.grid

This file was deleted.

10 changes: 5 additions & 5 deletions assets/grids/team8_grid_large.grid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
^^^ ^^^~~ ^^^^^^^^^^^^^^ ^^^^^^
^ ^^~~ ^^^^^^^^^^^^^^^^^^^ ^^^^^
^^^ ^^^~~ ^^^^^^^^^^^^^^} ^^^^^^
^ } ^^~~ ^^^^^^^^^^^^^^^^^^^ ^^^^^
^^^ ~~~ ^^^^^^^^^^^^^
^^^^^ ~~^ ^^^^^ ^^
^^^^ ~~~^^^ ^ ^^ ^^^
Expand All @@ -8,13 +8,13 @@
^ ~~~^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^
^ ^^~~ ^^^^^^^^^^^^ ^^^^^^^
^ ^^^~~ ^^^ ^^^^^^^ ^^^ ^^^^
^ ^^^~~~^^^^^^^^^ ^^^^^^^^^^^^~~~~~
^ { ^^^~~~^^^^^^^^^ ^^^^^^^^^^^^~~~~~
^^ ^^^^~~~~^^^^^^^^^^ ^^^^^^^^^^^^^~~~~~~~~
^^^ ^ ~~~~~^^^^^^^^^ ^^^^^^^^^~~~~~~~~~^^^^^
^^^ ^^~~~~~~^^^^^ ^^^^^~~~~~~~^^^^^^^ ^^^
^ ^ ~~~~~~~~##~~~~~~~^^^^^^^^^^ ^^^
^^ ^^^^^ ~~~##~~~~^^^^^^^^^ ^^^^
^^ ^^^^^^^^^^ ^^ ^^
^ ^^^^^^^^^^^^^ ^^^ ^
^ ^^^^^^^^^^^^^ ^^^ ^ {
^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^
^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Loading
Loading