Skip to content

Latest commit

 

History

History
 
 

Turtle Race

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Package/Script Name

Turtle race

Short description of package/script

This is a turtle race game where you have to make a bet on your turtle and stay to see if it will win or not


Aim & Purpose

This game is made to apply the concepts of turtle and random module

Setup

Copy the project to your local enviroment and that's all this code can be run on any python IDE.

Detailed explanation of script, if needed

OUR GAME RULES

  • Here you have to choose the colors between: "red", "orange", "yellow", "green", "blue","black"
  • You will see who will in the terminal

** Work Flow and Steps **

  1. First the game will take the input of the colors.
  2. Using the concept of lists first six turtles are made .
  3. Then those six turtles are placed to equally maintinig distance in a list we made their Y axis positions where to put them.
  4. Based on the input color if it will be in list then the game win continue.
  5. The turtles will move randlomly because of the random module where we are selecting value from 0 to 10 randomly.
  6. The values will be passed to the forward function which comes under turtle module to moving forward randomly.
  7. The game will end when one of the turtle reaches the endpoint.
  8. And the winnig turtle's color will be printed to the terminal.

Output

Turtle-race SCreenshot

Author(s)

Archisman Saha