Giter VIP home page Giter VIP logo

capstone_project_snake_game's Introduction

Capstone Project: Snake Game

Overview

This repo includes the Capstone project in the Udacity C++ Nanodegree Program.The source code has been heavily adapted from the provided starter code located at (Udacity's repo)[https://github.com/udacity/CppND-Capstone-Snake-Game].

Introduction:

Once the game starts it creates the Game, Controller, and Snake objects, then game continues to loop through each component and simultaneously grabs input from the user, Controller, later it updates the state of the Game, and graphically renderers the state of the game, Render. This is the high level overview of the logic flow.

Additional Functionality

When the game is launched, the user is first greeted with a warm welcome message and also the game detectes system platform which the user is running the game on.

Then the user is asked for the select a level. There are three different levels which user can start with: Easy (E), Medium (M) and Hard (H). Once the user has selected a particular level the snake speed is set to a particular value and game continues. The game board launches after the user provides a valid level and the user is able to play the game by moving the snake around with the arrow keys.

Following image shows the output on the terminal, when the game is launched in all different levels.

Results

Easy Level

Medium Level

Hard Level

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repo using https://github.com/vrushabhdesai/Capstone_Project_Snake_Game.git
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./snakeGame.

Criterias which support the Capstone Project:

Criteria Description
Loops, Functions,I/O The user has the option to select the starting level which sets the speed of the snake. A Game class member function UpdateStartSpeed is called and this member function encapsulates the Game's private data member snake and calls the Snake class member function SetStartingSpeed.
The project accepts user input and processes the input User Main Manu is the interactive interface with the game. GameManger.h class
The project uses Object Oriented Programming techniques. To meet this requirement, a Platform class was created in game.h to hold information about the system platform.
Classes use appropriate access specifiers for class members. The class uses member initialization lists and the member functions getPlatform and printPlatform to fetch and printout the user's detected system platform.
Classes abstract implementation details from their interfaces The C++ Guide by Google was used to for any needed documentation. An example can be found within game.h (Platform class member funtions) above the function declaration of getPlatform where a simple comment is used to describe what the function does.

capstone_project_snake_game's People

Contributors

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