USF-OS / FogOS

Other
0 stars 48 forks source link

Adding snake command to FogOS #70

Open snarayan57982 opened 1 month ago

snarayan57982 commented 1 month ago

Team Member: Duncan Birdsall @djbirdsall

Command:

The "snake" command will initiate a terminal-based rendition of the classic Snake game. Players will maneuver the snake using keyboard controls, guiding it to consume food and grow while steering clear of collisions with both the walls and the snake’s body.

Plan:

- Implementation:

The snake command will render a text-based version of the Snake game in the terminal, displaying the snake, food, and boundaries. The snake will be controlled by the arrow keys or something else if necessary, with food appearing randomly on the grid. The snake will move at a constant speed, and the game ends when it crashes into either the walls or itself.

- Key Input:

Players will control the snake’s direction using the keyboard (up, down, left, right). Ensuring the operating system can handle real-time keypresses for arrow keys is crucial, with fallback options for alternative key controls if the OS doesn’t support arrow key input.

- Game Logic:

The game continues until the snake hits the walls or itself, with the current score displayed in the terminal. After a game over, the game will automatically reset.

Files to be Added/Modified:

malensek commented 1 month ago

👍