3.0 KiB
3.0 KiB
Snake
( Doing it my way. )
The game
This follows the usual setting:
- Field
- Snake that cannot hurt itself
- Snake that gets wounded by the edges
- Score
The game should look something like this:
╔══════════════════════════════════════════════════════════════════════════════╗
║ ║
║ ║
║ ║
║ ║
║ ║
║ │ ║
║ │ ║
║ └───────o ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ 🍏 ║
║ ║
║ ║
║ ║
║ ║
║ ║
╚════[ Score: 12309 ]══════════════════════════════════════════════════════════╝
The minimum and maximum resolution of this game is 80
columes and 24
rows, Anything console larger will have no issues with this setup, anything smaller should pause the game with a message to resize.
Scoring is done by having a counter n, every time an object is eaten, this counter is added to the score and raised by one. So after four apples the score would be (1+2+3+4) 10.
The objects to eat are a series of emojis Snakes would eat IRL in nature. This is anything from fruits, nuts, frogs, etc.
Snake cannot eat itself, nor eat the border.