-
Notifications
You must be signed in to change notification settings - Fork 12
Pull Request for default_room, default_item on Openworld/default #631
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
Merged
Merged
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
0af61ef
Updated all functions in autogenerate.c to use calloc() instead of ma…
bryan22lee 0defb44
created CMakeLists.txt file for tests/openworld/ and also updated dep…
bryan22lee 2df1a1f
Added test for test_autogenerate.c, but need source code for gen_stru…
bryan22lee 2d96711
Revamping items and rooms module
517603d
Rooms and items compile
99feb79
Added items modules tests
0653c1d
Adding tests for sample_rooms and sample_items
65113b9
bogus commit
ce6da7f
Tests are passing for sample_rooms and sample_itemsgit status So fun!…
e57b30a
Revamped items struct per Dawson's instructions
738e3f0
New items module passes all tests
6da7f68
Revamping rooms module
f68d407
Fixed sample_room module tests. All tests pass!
2699338
create sample_npc.h with struct and functions
navila-luna d31c606
Merge conflicts need to be resolved, trying to pull gen-structs
f75e7be
Restructured items and rooms module,again. Referencing room spec!
8e6b9bc
Working out minor bugs and issues relating to compiling
b0ae070
Delete sample_npc.h
navila-luna 8daae59
Added make_default_item() to items module
a1c85e2
Working out more bugs. Switched to LL functions
c724b09
Refactored make_default_items
6536ab3
Fixed compile issues for items and rooms
3de2cc7
Fixed item modules tests
186e48e
Items module passes all tests
a7620d1
Fixing room module tests
8e7318b
Forgot to change function names in room module
d2f1f94
Fixed function names in room module
f4c0cca
Rooms module is passing tests
92d583d
added sample_npc.h and .c.
bb4dd9f
added sample_npc.h and .c.
2e2ee20
Minor edits for clarity
43ad9c9
Merge branch 'openworld/sample-generation' of https://github.com/uchi…
b9db41c
Trying a new double dimensional array arrangement
e76d240
Revert "Trying a new double dimensional array arrangement"
daa84ac
Revert "Minor edits for clarity"
cccb190
help me stash errors??
53bbfc2
Reverting back to passing tests state. Up next: cleaning up the code …
915ef49
Reverteing back to passing tests. Will work on optimizing code before…
e7eec20
Back to square one. Final edits coming
eba7b40
Renamed files to default
cf8db8c
Minor refactoring
93d710a
Finished reformatting, now onto tests
f899fe1
Fixed syntax errors.
d316418
Implemented hash table in items module
c1f66e0
Late night fixes ... hashes
ebb3827
Refactored make_default_item() into make_default_room
2510bc4
Need to fix HASH_FIND_STR return
10bf5fe
Added items tests
9360434
Pointer trouble
ba9cd3d
Added item definitions to get_default_items()
1f5ae09
Items module done. Tests passing.
3885444
fixing room modules pointers in hash structures
4ba259c
Refactored get_allowed_rooms()
ec505fc
Fixing room module tests
e48428f
Changed descriptions on rooms
d9ff91a
Completed writing tests for rooms/items module
bd105e9
Fixed comments in default_rooms per Nicole's instructions
2aa9fd1
Merge branch 'dev' into openworld/default
carolinaecalderon 9061c53
Fixed build errors from merging CMakeLists.txt
9ed45f6
Fixed formatting to match chiventure standards
2f14ed0
Fixed compile errors from changing formatting
ffd8797
Changed header formatting for default_rooms
c615c97
Merge branch 'openworld/default' of https://github.com/uchicago-cs/ch…
f83c86c
Changed header formatting for default_rooms
e9aeef9
Removed commented text in CMakeLists.txt
f07c781
pulled Eddy's PR request
26a6007
Fixed rooms module to add new gen_struct updates from Eddy's PR
f409257
Additional PR changes compile now, but tests for default_room do not …
5654d00
Implementing deep copy in default_rooms
589bf23
passing all tests temporarily. need to revisit default_rooms and why …
2e04072
ALL TESTS PASS HALLELUJAH
1da5f49
Fixed merge conflict in CMakeLists.txt (had to include custom-actions)
bd8cf62
Gave tmp hashtables NULL value
dwahme 8e25b73
Merge branch 'dev' into openworld/default
dwahme 444c9e4
Final PR edits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #ifndef _DEFAULT_ITEM_H | ||
| #define _DEFAULT_ITEM_H | ||
|
|
||
| #include "common/uthash.h" | ||
| #include "default_items.h" | ||
| #include "game-state/game_state_common.h" | ||
| #include "game-state/item.h" | ||
|
|
||
| /*get_default_items() returns all the default defined | ||
| * items in a hash table. | ||
| */ | ||
| item_hash_t *get_default_items(); | ||
|
|
||
| #endif /* _DEFAULT_ITEM_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #ifndef _DEFAULT_ROOM_H | ||
| #define _DEFAULT_ROOM_H | ||
|
|
||
| #include "default_items.h" | ||
| #include "game-state/game_state_common.h" | ||
| #include "game-state/room.h" | ||
| #include "gen_structs.h" | ||
|
|
||
| /* copy_item_to_hash is a helper function to deep copy | ||
| * items from the src hash to the dest hash using name | ||
| * as the key for lookup. | ||
| * Input: | ||
| * - item_hash_t *dst, *src: the source and destination hash tables | ||
| * - char *name: the key for look up | ||
| * Output: SUCCESS or FAILURE | ||
| */ | ||
| int copy_item_to_hash(item_hash_t **dst, item_hash_t *src, char *name); | ||
|
|
||
|
|
||
| /*make_default_rooms adds all the defined default rooms+items for a themed | ||
| * "bucket" (a name for a group of related rooms). In the case where the | ||
| * "bucket" IS NOT part of the default definitions, there are optional | ||
| * parameters for a short_desc, long_desc that will be used to define a | ||
| * new roomspec. In future springs, the npc struct will be added. | ||
| * | ||
| * Input: | ||
| * - char *bucket: the string identifier for the theme of the set of rooms | ||
| * char **sh_desc: optional , unless "bucket" IS NOT default defn, use as a room short_desc. | ||
| * - char *l_desc: similar purpose to sh_desc but for long_desc | ||
| * | ||
| * Output: | ||
| * - roomspec_t updated hash | ||
| */ | ||
| roomspec_t *make_default_room(char *bucket, char *sh_desc, char *l_desc); | ||
|
|
||
| #endif /* _DEFAULT_ROOM_H */ | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.