Class Planning Solution1:04 with Ashley Boucher
In this video, we'll review the solution for the Classes that will be used to build out the Four in a Row game.
Hey there, let's talk about classes in Four in a Row. 0:00 When I mapped out my object organization for this project, 0:03 I considered all the different parts of the game. 0:06 First, there was the game itself. 0:09 The game has two things, players and a board. 0:11 Players have tokens that they use to play. 0:14 The board has spaces that will eventually hold these tokens. 0:17 Once I broke the game down into these different parts, 0:20 translating those parts into objects was easier. 0:23 Each of those components, the game, the players, the board, the spaces, 0:26 and the tokens, can be represented in a class. 0:31 They all have states and behaviors that are important to the gameplay. 0:34 For example, players probably have names, or a color, or 0:38 another way to differentiate between them, and tokens move left, right, or down. 0:42 So to recap, the classes we'll be using for this app are game, 0:47 player, token, board, and space. 0:52 We'll be discussing their properties and 0:55 methods in great detail in the next stage of the course. 0:57 But in the meantime, head to the next step to start building out the classes. 1:00
You need to sign up for Treehouse in order to download course files.Sign up