Commit Graph

67 Commits

Author SHA1 Message Date
Trianta
64c5c5d20e core: fix arguments check crash 2024-08-03 18:40:38 -05:00
Trianta
6e7ae19e8b core: fix not closing when window exits and add bot gameplay to be an argument 2024-08-03 18:34:14 -05:00
Trianta
722970eb12 core: fix various bugs and simplify things 2024-08-03 01:26:10 -05:00
Trianta
ccf5843e61 core: move various booleans to single bits in struct 2024-08-02 21:23:49 -05:00
Trianta
b9b771bc1c refactor: convert engine to a singleton 2024-08-02 19:50:48 -05:00
Trianta
0ff3ef3f62 refactor: remove all code from being in namespace 2024-08-02 19:45:07 -05:00
Trianta
22da054dab controls: added adjusting game speed with - and + 2024-05-20 01:20:05 -05:00
Trianta
b18ce89970 bot: added ability to skip display delay between specific generations 2024-05-20 01:05:59 -05:00
05f78d67fd Add iterative approach to deciding DFS and BFS 2024-02-01 12:50:10 -06:00
Trianta
e2d0c5dac7 Mini style adjustment 2023-11-05 19:04:44 -06:00
Trianta
5dce9b677d Added scoring and chance-based algorithm picking 2023-10-24 00:54:30 -05:00
Trianta
da6ceebb55 Added displaying score 2023-10-23 21:33:47 -05:00
9bb4b8ebca Increased survivability with DFS when no path 2023-10-16 12:35:35 -05:00
Gregory
0ce07fa88d Minor settings adjustments 2023-10-14 00:35:23 -05:00
Trianta
e6797fa193 Split into BFS at first and DFS after 2023-10-13 19:22:11 -05:00
Trianta
b8a6a8d195 Replaced simple snake bot with AI 2023-10-13 19:07:08 -05:00
4733383d4a Logic cleanup 2023-08-19 23:32:53 -05:00
d2e1424e7d Added bot controls, bot still has poor pathing 2023-08-19 12:56:40 -05:00
197311831f Fixed going wrong way with snake movement 2023-08-19 00:19:04 -05:00
71dfa043a9 Fixed snake not showing on start 2023-08-18 22:36:47 -05:00
49182ce07d Snake now randomly starts as well 2023-08-18 19:51:15 -05:00
d7982b200f Separated generation into common file 2023-08-18 19:09:57 -05:00
441c52ab0f Added random generation on start 2023-08-18 18:15:21 -05:00
709cf26f99 Fixed code consistency issues 2023-08-18 18:09:09 -05:00
c57fbc714c Cleaned up some naming and added WASD controls 2023-08-18 17:51:58 -05:00
35244daa02 Removed unnecessary standard libraries 2023-08-18 16:42:54 -05:00
d83f271adf Fixed snake keeping movement on reset 2023-08-14 17:39:04 -05:00
c71b1d6982 Added ability to play again 2023-08-10 19:01:24 -05:00
a8cc2d1174 Turned Makefile into CMake 2023-08-10 18:34:43 -05:00
fb672c7ddb Added basic game over screen 2023-05-17 20:20:01 -05:00
a9d194c90c Fixed snake 2023-04-15 05:15:11 -05:00
498ac65dbc This was overengineered, lots of trimming to do 2023-04-06 22:22:06 -05:00
c01f687ec7 Doing too much at once. Need to fix branch 2023-04-06 19:27:10 -05:00
67e56bcb3c Issues to fix: sfml window and bounds checking 2023-03-17 21:40:49 -05:00
c4d40d152b Fixed major issues, still not launching due to vectors 2023-03-17 21:07:58 -05:00
9082d7fdfd Fixed class organization 2023-03-17 20:13:50 -05:00
f317dc7a8c Many issues restructuring the program, needs cleaning 2023-03-17 17:27:02 -05:00
a76d9ccfb5 Cleaned up naming of files; setup more structure 2023-03-13 21:10:52 -05:00
3ee01d936b Game finishes, but is buggy. Proper grid needed 2023-03-13 08:24:56 -05:00
6589dabc09 More cleaning for readabillity, added common file 2023-03-12 21:57:46 -05:00
de189301d4 Cleaned up code for readability 2023-03-12 08:50:50 -05:00
c67178450d Cleaned up file structure and added Makefile 2023-02-26 18:18:45 -06:00
TriantaTV
2c4537eda7 Fixed generation issue with snakeFood
Fixed generation issue with snakeFood and game should be fully playable without an official end screen implemented. So when the snake gets stuck or the game finishes, there is nothing to close the game automatically.
2022-08-21 02:51:33 -05:00
TriantaTV
88902fed6a Moved general functions to a general file
Moved general functions to a general file and added a statement to catch if  the newly generated location is the same. The snake food is not currently generating to a new random location like expected and is broken.
2022-08-17 00:41:29 -05:00
TriantaTV
cc3a61abb7 Snake food works with vertical movement
Snake food works with vertical movement, however horizontal movement is unchanging. Will look into getting a fix for it soon.
2022-08-15 23:51:18 -05:00
TriantaTV
0d3988a7ff Fixed food generation and removed unused code
Fixed food generation and removed unused code
2022-08-15 22:15:56 -05:00
TriantaTV
08ee516f0e Fixed snake stacking at boundaries 2022-08-10 20:05:28 -05:00
TriantaTV
7779881cc9 Fixed comments and added to gitignore 2022-08-10 19:59:48 -05:00
TriantaTV
c3342a14c7 Moved snakeFood to be a separate class
Moved snakeFood to be a separate class and a temporary unused function was added for randomly generating the new location.
2022-08-02 21:58:58 -05:00
TriantaTV
eae6b4c70d Game window now runs under GameState
Game window now runs under GameState and removed game from being hosted in main()
2022-08-02 21:17:23 -05:00