Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caarmen/snake
Snake game. Qt weekend project from 2001
https://github.com/caarmen/snake
Last synced: 11 days ago
JSON representation
Snake game. Qt weekend project from 2001
- Host: GitHub
- URL: https://github.com/caarmen/snake
- Owner: caarmen
- License: mit
- Created: 2017-11-04T13:56:31.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-18T22:39:45.000Z (almost 3 years ago)
- Last Synced: 2023-03-24T00:21:47.212Z (over 1 year ago)
- Language: C++
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.TXT
- License: LICENSE.TXT
Awesome Lists containing this project
README
Snake game
Carmen AlvarezThis is a game I wrote in April 2001, in part to pass the time away, in part
out of curiosity to learn QT.REQUIREMENTS
This game was initially written for Qt on Linux in 2001. In June 2011, I
updated it to compile on the latest version of Qt (4.7) on Mac OS X. I updated
it again in November 2017 to compile with Qt 5.9.2 on Mac OS X.BUILDING
These steps have only been tested on Mac OS X:
* qmake -project
* qmake QT+=widgets
* makeRUNNING
Run the snake executable.
Optional argument: --file where is a snake level
file.PLAYING THE GAME
The goal is to collect all the red apples and exit the game, in the fastest
time possible. Eating a red apple increases the snake's length, and
eating a green apple shortens the snake.SNAKE LEVEL FILES
You can create custom levels. The level is drawn in ASCII in a text file,
and specified with the --file argument when running the game.The first two lines of the file must start with a number which indicates
the width and height, respectively.* Place 'W' characters where the walls should appear.
* Place an 'N' character where the snake should enter the game. This should
be on one of the borders (top, left, right, bottom) of the room.
* Place an 'X' character where the snake should exit the game. The exit
will appear as a wall throughout the game, and after collecting all the
red apples, the exit will transform into a black tile.
For this reason, it is recommended to place the exit
either on one of the borders, or in the middle of one of the walls.