1 00:00:00,850 --> 00:00:03,890 To start off, let's think through our game and 2 00:00:03,890 --> 00:00:06,710 write out some pseudocode and comments. 3 00:00:06,710 --> 00:00:08,410 Pop over into cards.py. 4 00:00:09,540 --> 00:00:16,035 Our card class, will hold a card which will be a short word. 5 00:00:20,343 --> 00:00:24,300 We'll also need to know if this card has been matched or not. 6 00:00:24,300 --> 00:00:28,504 So we can check to find which cards still need to be matched and 7 00:00:28,504 --> 00:00:30,653 to see if the game has been won. 8 00:00:36,963 --> 00:00:41,858 Since you lay out the cards in a grid, we'll also need to store a location so 9 00:00:41,858 --> 00:00:45,215 we can find the cards the player wants to flip over. 10 00:00:47,692 --> 00:00:51,502 Lastly, we'll need to be able to see if two cards are equal so 11 00:00:51,502 --> 00:00:53,386 we can say they are matching. 12 00:00:58,080 --> 00:01:02,217 We can also add the ability to print out the card for the player as well. 13 00:01:07,544 --> 00:01:10,904 The game class is going to be a bit bigger. 14 00:01:13,591 --> 00:01:16,747 We'll need to know how big the game grid is, 15 00:01:20,110 --> 00:01:22,058 a list of card options, 16 00:01:26,420 --> 00:01:28,658 the columns for the top row of the grid. 17 00:01:30,940 --> 00:01:33,468 and a list of all the locations in our grid, 18 00:01:35,322 --> 00:01:37,016 Then we'll need some methods. 19 00:01:41,082 --> 00:01:47,554 One to create our card instances with words paired with locations. 20 00:01:47,554 --> 00:01:49,619 Another to create our grid. 21 00:01:51,980 --> 00:01:54,844 Then we'll need to check for matches, 22 00:01:57,550 --> 00:01:58,888 check if the game has been won, 23 00:02:01,323 --> 00:02:03,448 and finally, one to run the game. 24 00:02:05,330 --> 00:02:08,241 Finally, we'll need to add a dunder main, 25 00:02:12,630 --> 00:02:18,349 create an instance, and 26 00:02:18,349 --> 00:02:21,039 call the start game method. 27 00:02:23,913 --> 00:02:28,130 Okay, now that everything is planned out, it's time to dig in.