Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Basic Object-Oriented Python!
You have completed Basic Object-Oriented Python!
Preview
Time to create the start_game method to finalize our memory game.
Accomplished in this Video
- Created the start game method
- posts the game name
- starts a while loop
- prints the grid
- asks the player for their guesses
- checks them to see if the locations are good
- checks if they are a match and prints out the appropriate response
- checks if the game has been run
- created a game over message for when the loop ends
OOP Practice Ideas
- Store Inventory
- A class for items in the store
- A class for the inventory
- How can you add items to the inventory?
- How can you update items in the inventory?
- What about deleting items?
- Dungeon Game
- Using the grid-like we did in our memory game but instead of cards, one space holds a monster, and another the exit. Start your play in a spot on the grid and have them move around the grid one space at a time until they either find the exit and win or find the monster and lose.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
The game will be held in a while loop.
0:13
So let's create a variable called
game_running and set it equal to True.
0:16
Let's also print out our game header.
0:23
Feel free to get creative with this.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up