Giter Club home page Giter Club logo

turtle_crossing_game's Introduction

Turtle Crossing Game

This is a simple Turtle Crossing game built using Python's Turtle graphics library. The player controls a turtle trying to cross the road while avoiding cars.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/vimukthiwi/turtle-crossing-game.git
  2. Navigate to the project directory:

    cd turtle-crossing-game
  3. Ensure you have Python installed (preferably 3.7+).

  4. Install the required dependencies:

    pip install -r requirements.txt

Usage

To start the game, run:

python main.py

Use the Up arrow key to move the turtle up. The goal is to reach the top of the screen without getting hit by a car.

Game Mechanics

  • The player controls a turtle that moves upwards when the Up arrow key is pressed.
  • Cars move from the right side of the screen to the left.
  • If the turtle collides with a car, the game ends.
  • Each time the turtle reaches the top, the level increases, and the cars move faster.

Classes

Player

Handles the player (turtle) movement and checks if the player has reached the finish line.

CarManager

Manages car creation, movement, and speed adjustments.

Scoreboard

Manages the score display, updates, and game over message.

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


### Example File Structure

Ensure your project directory has the following structure for the README instructions to work properly:

turtle-crossing-game/ │ ├── player.py ├── car_manager.py ├── scoreboard.py ├── main.py ├── requirements.txt └── README.md

turtle_crossing_game's People

Contributors

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