Skip to content

93Jourdan/TurtleRacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🐢 Turtle Racers

A fun desktop racing game built with Python's Turtle graphics library. Pick your turtle, watch the race, and see if your racer crosses the finish line first!


🎮 How to Play

  1. Run the program — a popup will ask you to pick a turtle color
  2. Type one of: red, blue, green, orange, or purple
  3. Watch the race unfold on screen
  4. See if your turtle wins!
  5. Click anywhere on the screen to close the window when done

🛠️ Technologies Used

  • Python 3 — core programming language
  • Turtle — Python's built-in graphics library (no install needed)
  • Random — built-in module used to randomize each turtle's step size

🚀 How to Run

  1. Make sure Python 3 is installed:

    python3 --version
  2. Run the game:

    python3 turtle_racers.py

No external libraries required — both turtle and random come bundled with Python.


🗂️ Project Structure

turtle_racers.py    # Main game file (all logic in one file)
README.md           # Project documentation

🧱 Code Overview

Section What it does
Screen setup Creates the 700×400 game window with a light blue background
Turtle creation Spawns 5 colored turtles stacked vertically on the left side
Finish line Draws a vertical line at x=300 using a hidden turtle
Race loop Moves each turtle forward a random 1–10 pixels per frame
Win detection Checks if any turtle crosses x=300 and displays the result

✏️ Customization Ideas

  • Change the number of racers — add or remove colors from the colors list
  • Adjust race speed — tweak random.randint(1, 10) to a different range
  • Change the track length — update the 300 finish line x-coordinate and screen.setup width

👤 Author

Jay — Student Project
University of New Orleans

About

A Python simulation game where colorful turtles race to the finish line using randomized movement. Built with Python's turtle graphics module.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages