Game package 1 (10%)
You need to work in allocated groups to write an R package to help score or simulate a multi-player game. For example:
- Ten-pin bowling: Calculate the score of a game where the inputs are the number of pins knocked down in each throw.
- Blackjack: Calculate the score from a round where the inputs are the cards held by the player and the dealer at the end of the game.
- Poker: Calculate the winner from a game where the inputs are the cards held by each player at the end of the game. Start with a simple version of poker, and extend to more complex versions.
- 500: Score a game of 500 where the inputs are the cards played by each player for each trick.
- Snakes & ladders: Simulate a game of snakes and ladders on a specified board.
- Chess: Simulate a game of chess with random but correct moves by each player.
- Uno: Simulate a game of uno with random draws.
You may also have your own ideas for a game. If you would like to do something else, please discuss it with Mitch and Rob first.
The package should have at least 3 user-facing functions, and a vignette that describes how to use the package. The package should be well-documented, with all user-facing functions having examples and unit tests.
Marks will be awarded for clean and efficient code, and for good design.
Due: 16 May 2025
Submit