Giter VIP home page Giter VIP logo

snake's Introduction

Snake

For my OOP class project I chose to make an ASCII console game, so I went with one of the best old school classic games, (dramatic pause) Snake :D For the people who never played Snake before here is a link with little more information about the game: https://en.wikipedia.org/wiki/Snake_(video_game_genre).

When player starts the game, Main menu shows up and there are 3 options:

               1. Player can either press ESC and exit the game
               2. Press TAB to see TOP 5 highscores
               3. Press ENTER to start the game

Before pressing ENTER to start the game player has an option to enter any username he wishes, although username lenght is limited to 12 characters. If player does not enter anything, his username is by default set to "Unknown".

Commands

To move the snake player can only use arrow keys. Left arrow key(<-) to go left, right arrow key(->) to go right, exc. It is not possible for the snake to go downward if it is moving upward and vice versa, that also applies for left and right movement. Lastly, the snake can go through border and it will end up on the opposite side, so it is not game over if snake touches it.

Files

For setting bigger text (SNAKE and GAME OVER in Main and End screen) on board program uses 2 files (menuCoordinates.txt, endCoordinates.txt), they hold letter coordinates so make sure they are in your project directory. Every letter is sperated by the empty row, and every row is one line that makes a letter. For example, (1 1 2 2) represents x1, y1, x2, y2 and program draws a line from point 1 to point 2. Furthermore, highscores are saved in highscores.txt which means that file should also be in project directory.

snake's People

Contributors

nkelava avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.