Git Product home page Git Product logo

snakegame's Introduction

SnakeGame

you will have to demonstrate a useful application of the techniques listed below and learned during the course

Basic Techniques

Encapsulation / Information Hiding
Overloading / Constructors
Static Methods and Static Variables
Mutable and Immutable Classes
Inner Classes
Interfaces / Abstract Classes
Inheritance
Polymorphism
Generics
Swing / GUI / Event-Driven Programming
Array and ArrayList / Collections
Exceptions and File I/O

Advanced Techniques

Recursion
Model View Controller (MVC)
Functional Programming
Multithreading
Networking and Sockets

SNAKE GAME

the game has a START button that starts the game (at the beginning or after the end of previous round)
the game has a snake that is a chain of segments that follow each other
the snake moves by itself in one of 4 directions: North, East, South, and WEST
arrow keys change the direction of the snake
there are random elements (different types at random locations) that snake should eat "food" or avoid "poison" (the number of them could be set in your source code constants); different types of elements should look different
if the snake eats an element it grows 1 to 3 segments, if it hits an element to avoid the snake dies
you win if there is nothing eatable left, you loose if you hit a "poison", or boundary, or reverse the direction 180 degrees
the score is the size of the snake
you should remember high score
ADVANCED: upon a win, you present a new and more challenging board and the game continues after a nice and short message
ADVANCED: you can connect to another player over the network and then you can play against each other (game rules are yours to define)

snakegame's People

Contributors

jasimvk avatar raidenjason99 avatar morvedav avatar

Watchers

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