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
Creating the check for a winning game and other methods to our game class.
Accomplished in this Video
- Created a method to check if the cards at two given locations are a match
- Created a method to check if the game had been won by seeing if any card's matched attribute was still set to false
- Created a method to make sure the location the user gives exists in our grid
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
created cards and created the grid.
0:00
Now we need to check if two given
locations have matching cards.
0:02
Check if a game has been won.
0:08
And also check if the location of
player inputs is a valid input.
0:10
Let's start with checking for matches.
0:16
>> Let's call our method check match.
0:24
>> It'll take two locations.
0:29
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