Skip to content

yujunxian/TECHIN509-Assignment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turtle Racing Game

This project is a simple turtle racing game built using Python's turtle module. Players can bet on which colored turtle they think will win the race, and then watch the turtles race across the screen. The game provides a fun way to practice working with Python's graphics and randomization features. Code credit to: https://www.geeksforgeeks.org/turtle-race-game-using-python-turtle-graphics-library/

How to Run the Game

Prerequisites:

  • Python 3.x installed on your system.
  • The turtle module (included by default with Python). Running the Code:

Save the script to a file, e.g., turtle_race.py. Open a terminal or command prompt. Run the script using: python turtle_race.py.

How to Play

Setup:

  • When you run the game, a window will open with five turtles lined up at the starting line.
  • Place Your Bet: A pop-up input box will appear asking, "Which turtle will win? Enter Color:".
  • Enter the color of the turtle you think will win (e.g., red, blue, yellow, etc.).
  • Watch the Race: Click "OK" to start the race. Turtles will move forward randomly until one crosses the finish line.
  • Outcome: The program will announce the winner and whether your bet was correct.
  • Exit: Click on the window to exit the display.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 100.0%