Commit Graph

9 Commits

Author SHA1 Message Date
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
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
TriantaTV
f64577d2cd Moved render window into GameState 2022-07-29 16:27:18 -05:00
TriantaTV
19b91b78d2 GameState now only defines window limits
GameState now only defines window limits. RenderWindow is now set to be a separate object left in the main method.

Noted issues if put into GameState: Window never opens and the program just ends.
2022-07-29 15:53:59 -05:00
TriantaTV
1a90a4601a Added GameState and cleaned up unused code 2022-07-28 15:18:24 -05:00