Skip to content
/ snake Public

This is a C++ implementation of the classic Snake game. It utilizes the console for display and takes input from the keyboard. The game logic involves controlling a snake to eat fruits, grow longer, and avoid colliding with itself.

Notifications You must be signed in to change notification settings

Vamsi404/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

snake game using c++

This is a C++ implementation of the classic Snake game. It utilizes the console for display and takes input from the keyboard. The game logic involves controlling a snake to eat fruits, grow longer, and avoid colliding with itself. Features include:

  • Setup: Initializes game variables and positions.
  • Drawing: Renders the game grid, snake, and fruit on the console.
  • Input: Captures user keyboard input to control the snake's direction.
  • Logic: Handles movement, collision detection, and fruit consumption.
  • Score: Tracks and displays the player's score.
  • Game Over: Terminates the game when the snake collides with itself or the boundaries.
  • Delay: Implements a delay loop for smoother gameplay.

To run the game, compile the code using a C++ compiler and execute the resulting executable file. Enjoy playing and achieving high scores in this classic Snake game!

About

This is a C++ implementation of the classic Snake game. It utilizes the console for display and takes input from the keyboard. The game logic involves controlling a snake to eat fruits, grow longer, and avoid colliding with itself.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages