Commit Graph

102 Commits

Author SHA1 Message Date
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
Gregory
579baa61e7
Merge pull request #18 from TriantaTV/development
Code readability changes and reducing coupling
2023-03-12 21:59:20 -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
TriantaTV
d571db3d4e
Update README.md 2023-02-26 19:58:11 -06:00
TriantaTV
548392e025
Merge pull request #15 from TriantaTV/development
Development
2023-02-26 19:57:40 -06:00
153b4e1367 Added a README file 2023-02-26 19:56:11 -06:00
805430a090 Added making directories in Makefile 2023-02-26 19:56:00 -06:00
3c901e5f89 Adjusted Makefile and added clean up 2023-02-26 19:22:28 -06:00
TriantaTV
8f27c23250
Merge pull request #14 from TriantaTV/development
Development
2023-02-26 18:28:29 -06:00
407ef34522 Fixed linking issue 2023-02-26 18:22:25 -06:00
c67178450d Cleaned up file structure and added Makefile 2023-02-26 18:18:45 -06:00
TriantaTV
545bc2a41b
Merge pull request #10 from TriantaTV/Development
Fixed snake food generation
2022-08-21 02:52:46 -05: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
f526a7500f
Merge pull request #9 from TriantaTV/Development
Fixed stacking at boundaries
2022-08-10 20:13:22 -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
766c223578
Merge pull request #8 from TriantaTV/Development
Game is now in GameState and snakeFood has a SnakeFood class
2022-08-02 22:00:12 -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
eb0c19e631
Merge pull request #7 from TriantaTV/Development
GameState now handles RenderWindow
2022-07-29 16:31:29 -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
962d2a006b
Merge pull request #6 from TriantaTV/Development
Cleaned up unused code and added GameState
2022-07-28 15:45:15 -05:00
TriantaTV
1a90a4601a Added GameState and cleaned up unused code 2022-07-28 15:18:24 -05:00
TriantaTV
e812588200 Added snake collision with itself
Added snake collision with itself and also changed color to green.
2022-07-28 14:56:54 -05:00
TriantaTV
69423bf9d0 Cleaned up unused code and added more comments for clarification 2022-07-27 15:15:36 -05:00
TriantaTV
7589e17d6b
Merge pull request #5 from TriantaTV/Development
Added eating food being able to extend snake
2022-07-27 15:09:24 -05:00
TriantaTV
12a9b118a2 Added eating food being able to extend snake
Added eating food being able to extend snake and food still moves
2022-07-27 15:07:28 -05:00
TriantaTV
d261a07dbb
Merge pull request #4 from TriantaTV/Development
Added boundaries for snake movement
2022-07-26 19:47:27 -05:00
TriantaTV
9f90e6fb2f Added boundaries for snake movement
Snake is now limited to a hard-coded boundary. Boundary is planned to be changed to no longer be hard-coded.
2022-07-26 19:47:08 -05:00
TriantaTV
84805e9751
Merge pull request #3 from TriantaTV/Development
Changed player to be a class with a deque for the body with movement working.
2022-07-26 19:26:06 -05:00
TriantaTV
97085dd314 Fixed movement and color of snake 2022-07-26 19:24:46 -05:00
TriantaTV
a8eee1db4d Changed movement to control the Player object
Changed movement to control the Player object. Movement not currently working, actively being looked into.
2022-07-26 19:03:55 -05:00
TriantaTV
94abee7e61 Added ability to get snake head position
Added ability to get snake head position and created a snake constructor with a position.
2022-07-26 16:56:26 -05:00
TriantaTV
5842130425
Merge pull request #2 from TriantaTV/Development
Development runs but not yet updated with new features
2022-07-25 16:14:26 -05:00
TriantaTV
c03b16f0e9 Laid groundwork for creating a snake body
Laid groundwork for creating a snake body. Implementation should be added and working next push.
2022-07-25 16:12:11 -05:00
TriantaTV
3d8dcf23ac Deque swapped to hold sf::RectangleShape
Deque swapped to hold sf::RectangleShape and will allow for holding a deque for each snake body piece. Snake class can create functions to get necessary tests through deque.
2022-07-25 16:06:06 -05:00
TriantaTV
c7263dfc1f SnakeNode is now depreciated due to swapping to a deque 2022-07-25 15:43:42 -05:00
TriantaTV
165e531205 Split into separate files and added planning
Snake is now planned to use a deque for location of body. Split snake into separate file outside of main.
2022-07-25 15:40:45 -05:00
TriantaTV
8e4d53ea2a Added snake food and food moves when touched
Movement is not yet made to be randomly positioned.
2022-06-10 14:40:12 -05:00
TriantaTV
ca7f6db077 Created snake head 2022-05-06 01:26:17 -05:00
TriantaTV
2993bdefd1 Removed app for cleanup 2022-05-06 00:48:51 -05:00
TriantaTV
4295a5cd22
Merge pull request #1 from TriantaTV/master
Added folder structure and default main layout
Branch mistake
2022-05-06 00:45:10 -05:00