Added big turtle image when you win
This commit is contained in:
parent
b14c6d2660
commit
3df378dd21
1 changed files with 11 additions and 0 deletions
11
main.py
11
main.py
|
@ -1,3 +1,5 @@
|
|||
from tkinter import PhotoImage
|
||||
|
||||
from audio import Audio
|
||||
|
||||
try:
|
||||
|
@ -18,6 +20,13 @@ try:
|
|||
screen.setup(WIDTH, HEIGHT)
|
||||
screen.title('Turtle Match - Benjamin Zimmerman')
|
||||
|
||||
success_t = turtle.Turtle()
|
||||
success_t.hideturtle()
|
||||
success_t.penup()
|
||||
turtle.register_shape('success_turtle', turtle.Shape('image', PhotoImage(file='images/turtle.png')))
|
||||
success_t.shape('success_turtle')
|
||||
success_t.goto(-379, 0)
|
||||
|
||||
Audio.start_audio()
|
||||
Audio.play_background_music()
|
||||
|
||||
|
@ -65,6 +74,7 @@ try:
|
|||
end_routine_done = False
|
||||
clicked_cards = []
|
||||
|
||||
|
||||
def clicked_card(x, y):
|
||||
"""
|
||||
Appends the card which was clicked on to the list clicked_cards.
|
||||
|
@ -90,6 +100,7 @@ try:
|
|||
time.sleep(0.1)
|
||||
if not end_routine_done:
|
||||
if matches >= 8:
|
||||
success_t.showturtle()
|
||||
Audio.pause_music()
|
||||
Audio.game_success()
|
||||
time.sleep(3.1)
|
||||
|
|
Loading…
Reference in a new issue