I’m working on a python project and need a sample draft to help me understand better.
hey, i want to make a python turtle tails matching game, which has a grid and bunch of tails and the player click on them and try to match them and there is a count time each time the player win it record the time.also the tails should show their answers when they randomize for a little bit of time so the player have a change to remember a little then they flip back. noting fancy just working game.
build it using
Player is presented a grid of cards/tiles, showing the backs of all the cards.
The cards stay in their same positions for the duration of the game.
Player clicks a card to see the face side, then clicks another card to try and find the match. (There are two cards of each pattern.)
If the two cards match, a message appears, and after some number of seconds, the two cards are removed from the grid.
If the two cards don’t match, a message appears, and after some number of seconds, the two cards revert to the back.
Game play continues until all the matches are found and the grid is empty.
A game over screen appears, showing the time to finish the game. Player is prompted to play again or end the program
Create this in Trinket, using Turtle graphics.
Should include a Card class. Instance variables include a turtle object for that card, card image or pattern, visible (boolean), coordinates.
Card objects should be put in a list; needed for layout and for verifying matching card (based on image or pattern)
Animation loop will be continually running.
Some functions that might be useful:
new_game (cards list)
(loops Card list, determines coordinates, renders Cards, starts animation loop)
check_match (card1, card2):
returns True or False
returns Card object that was clicked (based on coordinates of click and of cards)
generate_cards (number of pairs)
create the appropriate number of cards, return list of Card objects
# if using datetime objects
get_elapsed_time (start time)
return number of seconds since start time