PlotMyGame {SnakesAndLaddersAnalysis}R Documentation

Plots the game of Snakes and Ladders

Description

This function plots the result from the SnakesAndLaddersGame Function.

Usage

PlotMyGame(output.from.SnakesAndLaddersGame.function, legend = TRUE)

Arguments

output.from.SnakesAndLaddersGame.function

The output from the SnakesAndLaddersGame function.

legend

Takes value TRUE or FALSE, if TRUE, displays the legend for the plot.

Details

Function that takes output from the SnakesAndLaddersGame function and plots it with an appropriate legend and nice colours to represent each players game. Only accepts number of players between 1 and 7.

Value

A plot

Plots the players position on each roll.

Author(s)

Hector Haffenden haffendenh@cardiff.ac.uk

Examples

PlotMyGame(SnakesAndLaddersGame(1))

PlotMyGame(SnakesAndLaddersGame(3))

PlotMyGame(SnakesAndLaddersGame(7))


[Package SnakesAndLaddersAnalysis version 2.1.0 Index]