https://github.com/ghubnerr/turtle-crossing
A Python version of Crossy Road
https://github.com/ghubnerr/turtle-crossing
Last synced: 6 days ago
JSON representation
A Python version of Crossy Road
- Host: GitHub
- URL: https://github.com/ghubnerr/turtle-crossing
- Owner: ghubnerr
- License: mit
- Created: 2023-05-25T00:56:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-25T01:07:15.000Z (over 2 years ago)
- Last Synced: 2025-05-30T08:52:23.175Z (5 months ago)
- Language: Python
- Size: 399 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Crossy Road with Turtle Graphics
## The Game
This code uses various instances of the Turtle class to create different objects. The [`player.py`](player.py) class is the main turtle, whose commands are listened by the `Screen()` object, waiting for key strokes of "Up","Down","Left" and "Right" to move the turtle a fixed step in the given direction.[`car_manager.py`](car_manager.py) holds instances of car objects that are generated inside the road gaps every 7 ticks so long the game is running. They are moved a set pace, until there is an increment in their velocity after the turtle reaches the finish line. The score is held by the [`scoreboard.py`](scoreboard.py) class, which in turn is another instance of the Turtle class, responsible for keeping track of the score on the screen, as well as writing "GAME OVER" once the game finishes.
## Installation on Local Machine
1. Clone the repository:
`shell$ git clone https://github.com/ghubnerr/turtle-crossing`
2. Navigate to the project directory:
`cd turtle-crossing`
3. Run the code:
`python turtle-crossing`Alternatively, download the `.zip` file and execute step 3 at the desired directory.
### Requirements:
* Git (for cloning)
* Python 3.x## License:
This project is licensed under the [MIT License](LICENSE).## Acknowledgements
Inspirational credit for Dr. Angela Yu and her 100 Days of Code in Python for Udemy.