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

Team 8 initial world #25

Merged
merged 50 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b7a0f17
Changed default maze and added two cell types
Scor23 Sep 21, 2023
bfd5db4
Added some detection for neighbors, not working yet
lmgarvey Sep 22, 2023
c657e4c
Reordered the addagent list in simple_main to
Scor23 Sep 23, 2023
0e3740d
Renamed files and reverted original files
Scor23 Sep 26, 2023
bd57510
Merge branch 'MSU-CSE491:main' into main
carrgran Sep 27, 2023
16713eb
Reorganized team8_main.cpp file
Scor23 Sep 27, 2023
f460d2d
Merge branch 'MSU-CSE491:main' into main
Ytesgn Oct 1, 2023
70b2d49
Added removing agents functionality
Ytesgn Oct 1, 2023
00f610b
Added basic test for ManualWorld constructor and ensuring agents are …
carrgran Oct 2, 2023
3e40dff
Adding some docstrings to our functions
lmgarvey Oct 3, 2023
29f3fe1
Merge branch 'MSU-CSE491:main' into main
carrgran Oct 3, 2023
f8b3d27
Adding some loot logic, loot does not currently appear on the grid. L…
lmgarvey Oct 4, 2023
ed71e36
Merge branch 'main' of https://github.com/Ytesgn/cse_491_group_8_fork
lmgarvey Oct 4, 2023
d97157a
Added facing direction for agents. Based off of last move. Move down …
carrgran Oct 4, 2023
beb0a79
Defaulted facing direction to start at 0 - not a direction. Gets upda…
carrgran Oct 4, 2023
200b3d8
Changed grid to larger grid and added bridge tile
Scor23 Oct 4, 2023
1aeacc7
Adding battling in the console and added a Pacing Agent to test it
Ytesgn Oct 6, 2023
686f71b
Updated direction of agents to be a property instead of a member vari…
carrgran Oct 8, 2023
faeee83
Added axe and boat items. Added AddEntity function to WorldBase.
carrgran Oct 10, 2023
13221b2
Changed battle health; Ability to set cell type
Scor23 Oct 10, 2023
8a496a8
Adding loot appearing on grid, picking up, and using axes and boats
lmgarvey Oct 11, 2023
b962198
Fixed loot drop so it's not just pickaxes
lmgarvey Oct 11, 2023
d6afea5
Fixed it so boats uses don't turn water into a bridge
lmgarvey Oct 11, 2023
29c3dea
Merge branch 'MSU-CSE491:main' into main
carrgran Oct 11, 2023
7fa42e7
Small bug fix. Still need to fix why dynamic cast assert is failing.
carrgran Oct 11, 2023
4f54938
Allow entities to be different symbols.
carrgran Oct 11, 2023
124e2dd
Have direction get set on first move rather than initialized to 0.
carrgran Oct 11, 2023
2f99c12
Specified types for some SetProperty and GetProperty so that world ca…
carrgran Oct 11, 2023
2bb939a
Specified more types for Set and GetProperty
Scor23 Oct 11, 2023
dd57e1b
Moved world test into worlds folder
Scor23 Oct 11, 2023
e0f7ad9
Change damage type from double to int.
carrgran Oct 11, 2023
98cde18
Condensing loot properties into entity property map
lmgarvey Oct 12, 2023
19aafb7
Adding NPCs being able to choose a random move when battling and move…
Ytesgn Oct 13, 2023
0ae376a
CMake changes
Ytesgn Oct 13, 2023
f663da6
Accidently deleted CMake file, pushing it back
Ytesgn Oct 13, 2023
afcf897
Fixed bug with setting axe property to Cut instead of Chop. Also rena…
carrgran Oct 16, 2023
d5dca7d
Refactored some code into a function.
carrgran Oct 16, 2023
05635d9
Change C style casts to static_cast.
carrgran Oct 16, 2023
d57943e
Fixed a static cast for other_damage.
carrgran Oct 16, 2023
fd2c1b9
Refactored how to set new cell type
Scor23 Oct 16, 2023
627f23c
Merge branch 'main' of https://github.com/Ytesgn/cse_491_group_8_fork
Scor23 Oct 16, 2023
72cd4a3
Moved HandleNeighbor to UpdateWorld function
Scor23 Oct 16, 2023
5e543ca
Refactor Other Agent action into a function and add invalid input to …
Ytesgn Oct 17, 2023
be1be5b
Broke DoAction down into helper functions
lmgarvey Oct 17, 2023
9cd5400
Merge branch 'main' of https://github.com/Ytesgn/cse_491_group_8_fork
lmgarvey Oct 17, 2023
fcc81ea
Renamed functions to match naming convention. Changed RemoveItem to r…
carrgran Oct 17, 2023
bbe8036
Fixed docstring.
carrgran Oct 17, 2023
6771f49
Fixed types for position of item when dropped. Changed function name …
carrgran Oct 17, 2023
3307ba3
Renamed AttemptItemPickup to be a DoActionItemPickup to match other D…
carrgran Oct 17, 2023
3802d56
Remove inventory variables/functions. Using properties instead.
carrgran Oct 18, 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
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")

# all the possible executables [each team can have their own configuration]
# copy over simple or same and change the accordingly
set(EXECUTABLES simple sfml_example)
set(EXECUTABLES simple sfml_example team8)


# setting the output path to executable
Expand All @@ -34,12 +34,12 @@ foreach(EXECUTABLE ${EXECUTABLES})
set(SOURCES source/${EXECUTABLE}_main.cpp)
add_executable(${EXECUTABLE} ${SOURCES})
target_include_directories(${EXECUTABLE}
PRIVATE ${MAIN_SOURCE_DIR}
)
PRIVATE ${MAIN_SOURCE_DIR}
)
target_link_libraries(${EXECUTABLE}
PRIVATE sfml-window sfml-audio sfml-graphics
)
PRIVATE sfml-window sfml-audio sfml-graphics
)
endforeach()


add_subdirectory(tests)
add_subdirectory(tests)
20 changes: 20 additions & 0 deletions assets/grids/team8_grid_large.grid
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
^^^ ^^^~~ ^^^^^^^^^^^^^^ ^^^^^^
^ ^^~~ ^^^^^^^^^^^^^^^^^^^ ^^^^^
^^^ ~~~ ^^^^^^^^^^^^^
^^^^^ ~~^ ^^^^^ ^^
^^^^ ~~~^^^ ^ ^^ ^^^
^^^^^~~~~^^^^^^^^ ^^^^^^^ ^^^^^
^^^^~~~^^^^^^^^^^^ ^^^^^^ ^^^^^^^
^ ~~~^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^
^ ^^~~ ^^^^^^^^^^^^ ^^^^^^^
^ ^^^~~ ^^^ ^^^^^^^ ^^^ ^^^^
^ ^^^~~~^^^^^^^^^ ^^^^^^^^^^^^~~~~~
^^ ^^^^~~~~^^^^^^^^^^ ^^^^^^^^^^^^^~~~~~~~~
^^^ ^ ~~~~~^^^^^^^^^ ^^^^^^^^^~~~~~~~~~^^^^^
^^^ ^^~~~~~~^^^^^ ^^^^^~~~~~~~^^^^^^^ ^^^
^ ^ ~~~~~~~~##~~~~~~~^^^^^^^^^^ ^^^
^^ ^^^^^ ~~~##~~~~^^^^^^^^^ ^^^^
^^ ^^^^^^^^^^ ^^ ^^
^ ^^^^^^^^^^^^^ ^^^ ^
^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^
^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150 changes: 150 additions & 0 deletions assets/grids/team8_grid_v2.grid

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion source/Interfaces/TrashInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ namespace cse491 {
// Add in the agents / entities
for (const auto & entity_ptr : item_set) {
GridPosition pos = entity_ptr->GetPosition();
symbol_grid[pos.CellY()][pos.CellX()] = '+';
char c = '+';
if (entity_ptr->HasProperty("symbol")) {
c = entity_ptr->GetProperty<char>("symbol");
}
symbol_grid[pos.CellY()][pos.CellX()] = c;
}

for (const auto & agent_ptr : agent_set) {
Expand Down
Loading