Giter Site home page Giter Site logo

snakegame's Introduction

Snake Game

This repository contains a simple Snake Game implemented using the Java Swing package. The Snake Game is a classic arcade game where the player controls a snake to eat food and grow in length while avoiding collisions with walls or its own body.

Features

  • Intuitive controls: Use arrow keys to navigate the snake.
  • Dynamic gameplay: The snake grows longer when it eats food.
  • Random food placement: Food appears at random positions on the game board.
  • Scoring system: Keep track of the player's score based on the number of food items eaten.
  • Collision detection: Game over when the snake collides with walls or its own body.
  • High score tracking: Record and display the highest score achieved.
  • Sound effects: Enjoy audio feedback during gameplay.

Getting Started

To play the Snake Game, follow these steps:

  1. Clone or download the repository.
  2. Compile the Java source files.
  3. Run the compiled Java program.
  4. Use the arrow keys to control the snake and navigate the game board.

Usage

  • Control the snake using the arrow keys on the keyboard to move up, down, left, or right.
  • Aim to eat as much food as possible and avoid collisions with walls or the snake's body.
  • Challenge yourself to achieve the highest score possible and compete with friends.

Developer

jignesh khunt ([email protected])

License

Copyright 2019 jignesh khunt

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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.