Giter Club home page Giter Club logo

snakexenzia's Introduction

SnakeXenzia

Snake Game build in C using Linked List.

Features:

  • It creates a grid of 20 X 20 as the roaming space for the snake.
  • If the snake crosses the boundary then it will come up from the opposite boundary.
  • Movement of snake is done using w-a-s-d keys:
    • w -> forward
    • s -> backward
    • d -> right
    • a -> left
  • Load saved game functionality is there.
  • Real time increase in length of the snake as it eats the food.
  • Snake dies if it bites itself.

Functionality:

  • 20 X 20 grid is created by printing # at the boundaries.
  • 20 X 20 size matrix is created for tracking movement of snake.
  • Food is created using random function inside the 20 X 20 grid.
  • As the snake, head->x, head->y matches with the fhead->x, fhead->y then a new linked list node is added at the tail of the snake.
  • With each movement of snake we check whether the head->x, head->y matches with any linked list node->x and node->y, if yes then it means snake has bitten itself and game will be over.
  • For loading a saved game press 'L' at start of the game, the snake location and score will be loaded from the file Snake.txt.
  • For quitting the game press 'X', at the time of quitting current progress and snake location will be saved in Snake.txt file.

snakexenzia's People

Contributors

naman97jain 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.