In this homework assignment, you will create a simulation of the children’s board game, Chutes and Ladders.

statistics

Description

Chutes and Ladders 


In this homework assignment, you will create a simulation of the children’s board game, Chutes and Ladders. The game is simple. Players spin a spinner with number 1 through 6. Players move their piece that many spaces. Some spaces have ladders, and the player moves to a new location on the board. If you land at the bottom of a ladder, you move to the top of the ladder. Some spaces have chutes (slides) which causes the player to move backward. If you land at the top of a chute, you move to the bottom of the chute. The first player to land exactly on space 100 wins the game.


Part 1 


Here is a picture of the official game board


Figure out how to save and store the features of the gameboard in R.


You’ll need to keep track of chutes, ladders, and the dimensions of the board.


In the Rmd file, create a single object called board where you store the features of the game board in R. 


Part 2 


In the script file, create a function called show_board() that takes one argument board (the object you created in part 1). The function will then produce a plot showing the board. 


The plot will produce a square grid with the spaces properly numbered. Note that the numbers reverse directions each row. Chutes will be represented with red arrows, and ladders should be represented with green arrows (lwd = 2)


Related Questions in statistics category