Goals: what you will make by the end of the day

Untitled

1. Create Class and how to use inherit classes

2. Know turtle coordinate system and turtle game engine

Choose Your Difficulty

<TBD>

How to use the Starter Code

#Sequence diagram

Untitled

Basic flow:

  1. Initialize screen with 600 x 600 pixels and disable tracer
  2. Create player object as Turtle
    1. setup object shape as turtle
    2. setup penup() without leave track
    3. setup turtle’s start location at (0,-280) with head angle
    4. define go_up method and move distance is 10
    5. define is_at_finish_line method to check current turtle position if reach Y cor 280
    6. define go_to_start method for go back to start position at (0,-280)
  3. Create car in right boundary x=300,y is -250~250
    1. Create a list to store car object
    2. Define car speed equals 5
    3. Define create_cars method
      1. setup car shape is square
      2. setup penup
      3. setup color with random color
      4. setup car in random position of Y cor
      5. setup car move destination is (300, Y cor)
      6. add car to a list
    4. Define move_car method
      1. car move speed is 5
  4. Create scoreboard
    1. setup game level is 1
    2. hide scoreboard
    3. Define update_scoreboard() method to refresh score
    4. Define increase_level method to refresh game level, if pass to count 1
    5. Define game_over() method to show word of Game Over in center of window
  5. Setup screen listen
  6. Setup “Up” key and corresponding event trigger function
  7. Refresh screen with time interval 0.1
  8. Update screen
  9. Create a cars randomly
  10. Car move from right to left side
  11. Detect Turtle collision with Car
    1. Game over show on center window once Turtle and car distance < 30