-
Notifications
You must be signed in to change notification settings - Fork 0
GregCart/COMS327-Pokemon
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Implements All map generation requirements with basic pathing generation. Commeneted code is for debugging, ease of use, and the remains of my attempt at dijksta's algorithm for generating a path. pokemon-old contains my solution pre HW5 requirements HW2: All commands implemented and working as of 2/7/23. NOTES: Map is opposite: (-200, -200) maps to upper left corner Occasionally a malloc() error will occur on startup or during traversal. i looked into it and apparently it's to do with how malloc calls other functions and i'm not sure how to fix it. Moves that go past map borders just set uyou at the map at that border. Chance of buildings appearing decreases as you move out until +/-100, where it is locked at 5%. Gates match up when they are generate adjacently to an already generated map. No map is generated until it is visited. World borders have no exit on the side that borders the world edge. HW3: Can generate starting map with no uissues and display proper maps NOTE: Displays Hiker then Rival Maps Malloc error still present. Program crashes if you try to move. Several TAs as well as the professor haven't been able to identify the cause. HW4: All the errors of before x100 NOTES: Characters sometimes flee instead of moving towards PC fsr (I think i figured this problem out) Characters sometimes teleport arround for no reason or skip turns. Will randomly stop or segfault in the middle of a run (idk why) All trianers have a random chance to spayn barring hiker and rival which will spawn if numtrainers >= 2 HW5: All Commands should work properly, but moving onto immovable terrain will cause the game to progress without you being able to do anything. Should no longer randomly crash mid-run NOTES: Characters all flee or move randomly, with some just choosing not to move (no idea why) It is really slow to run and idk why, but it will take a few seconds between each turn Entering a building still sometimes ends the game Battles only begin if characters are facing eachother Sometimes defeating a trainer in battle will make you the one defeated (idk why) then the game willl progress without you Sometimes the Battle interface will randomly trigger, and this breaks the game, so cntrl+c (idk why) Trainer list displays 1 trainer at a time. Colors should all work, with all trainers being white (for visibility, not a race thing) Ive been trying to get most of the problems fixed, but with OHs being reschedueled it didnt work out with my schedule (I added the link to the github, so if you've some free time i would appreciate any help with the trainers running away problem! I've spent a lot of time and effort trying to fix it and i still cant figure it out. It's also very slow to take your turn so any suggestions would be welcome!) HW6: It doesn't build. I've spent countless (like 30) hours trying to figure out why when it build it outputs a bunch of "reference not defined for" style errors. All of the code fpor the requirements is implemented and is converted to c++ (see functions move_player() and handle_code() for the buld of movement handeling), but I can't test it. I went to office hours for this as often as I could (3 days), but couldn't figure it out. Ill go again next week when I can again, but for now you'll just have to read the code. NOTES: Presumably still has the same errors as before, but I did re-factor and re-work some of the major movement features for npcs Presumably, all commands still work, and so does fly, but n, s, e, w, are not implemented (as they overlap with requirements) Once again the github link is still there, so feel free to take a look there too. I merged everything to master. HW6 RE & HW7: It's failing on things that I don't understand. I have functions that return arrays as poineters, but it only treats them as if the are returning the pointer, and doesn't index them. I found a workarround in `map_chars()`, but That only works because I could spare an extra temp variable. I cant do it everywhere, but in `player->pos = new Point(((int *) m->get_map_gates())[1], BOUNDS_Y-2);` That cast was enough to fix the error. None of these appeared before and calgrind doesnt tell me anything. If you know how to fix these issues, please either respond to the post or email me. Thank you Also there are still getch() statements sacttered from debugging. File reading things are in teh database-utils files. HW7: The file printing works, but it doesn't load the database yet. Ill work on getting that submitted by friday on piazza. If you give it any filename in the specified directory in the pdf, it will print eveything in the file in a nice format, unless tehr eare more than 18 categories with long names (but thats because of the limit in terminal size). If it doesnt show for you, make your terminal full screen. Notes: Prints 45 lines of the file at a time, press any key to see the next 45. When eof is reached, you will see a mesage telling you to press any key to exit the program. still doesn't run, but will compile properly. File reading things are in the database-utils files. As always, github link at the bottom. HW7 RE: It now loads all the database, and can print a file for display if correct flag is used. There are several getch() statements for debuging purpoised, but it fails on init_trainers() when building a new random trainer, and I can't figure out why. If you find out please let me know. Thank you. --numtrainers <number> --displayfile <filename> To build and run: make To build: make build To run: make start To run test: make test To run test w/ Valgrind: make test-v TO clean: make clean To package into tarball: make package Github Repo with all changes: https://github.com/GregCart2/COMS327-Pokemon
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published