- #PLAY HASBRO CANDY LAND BOARD GAME ONLINE HOW TO#
- #PLAY HASBRO CANDY LAND BOARD GAME ONLINE SIMULATOR#
Further, note that there are seven "special" spaces that can appear on both the board and the cards: star, ice cream, gingerbread, chocolate, cupcake, lollipop, and ice pop. These six colors also appear on the cards. Note that there are six "regular" colors for the spaces: red, orange, yellow, green, blue, and purple. Now that we've got Player defined, we need to take a look at something that is common to the BoardSpace and Card classes: Cand圜olor. The property IsWinner is a flag that the Game object will look at after each turn as soon as one Player has IsWinner set to true, the game is over.
We'll explain the IsSkipped property in the BoardSpace section. We need a way to store what space the player currently resides on, and IMO the best place to put that is in the Player class itself. Technically, the only thing we really "need" is their turn order, but to make the simulation a little nicer we'll also gather the players' names. We'll need some basic information about the players in order to simulate the game. We'll need all six of these objects to play a game the latter three we will deal with in Part 2 of this series.
The spaces the players can land on (134 in my edition).The cards the players can draw (64 in my edition).The players playing the game (between 2 and 4).In any game of Candy Land, there are three basic components: NET! Basically Awesomeīefore we can do anything else, we need to model the components of Candy Land as C# classes.
#PLAY HASBRO CANDY LAND BOARD GAME ONLINE SIMULATOR#
Guess what we're gonna do? Let's build a command line Candy Land simulator in C# and. That means that we can write a program to simulate playing the game, and it wouldn't be too hard.
Once the cards are shuffled, a person who can see the deck of cards will know who will win the game. Simple enough, right? Here's the interesting part: the game is deterministic. Only two complications arise on the board: a couple spaces have black licorice on them, and if you land on one of those space your next turn is skipped (which doesn't make any sense to me, seeing as black licorice is delicious) and there are two shortcuts on the board that can be accessed by landing on their starting spaces. The first player to reach the end of the path wins. There are also seven "specialty" spaces with pictures of sweet items on them, and if you draw the card with that item you go directly to that space (which also means you could move backwards by drawing a specialty card). Players draw cards which have simple colors (red, orange, yellow, blue, green, purple) on them, and then move to the next matching space with that color. Lemme break it down for those of you who haven't seen this game before.
#PLAY HASBRO CANDY LAND BOARD GAME ONLINE HOW TO#
This is Part 1 of a two-part series detailing how to simulate the Hasbro board game Candy Land as a C# console project.Īnybody remember the game Candy Land? You know, the simple colors and sweets game that little children play to learn how to play board games? The one that requires absolutely zero skill or reading comprehension to play?Ĭandy Land by amboo who?, used under license