new_game: Initialize a new Alice Twist game

Description Usage Arguments Value Examples

View source: R/game.R

Description

Create an Alice Twist game that can be played by two users or against the CPU.

Usage

1
new_game(players = 2, hands = 2, fingers = 5, split = TRUE)

Arguments

players

The number of players. players at the moment can be between 2 and 4 even if some methods are built for two players only.

hands

The number of hands for each player. Since this implementation come from the original kids game, the buckets that each player has are call hands. hands must be integer but at the moment its number has no limit.

fingers

The number of fingers for each hand. Also in this case the name of the variable is derived from the kids game but in this general form the number of fingers could be different from 5, provided that it must be integer.

split

If TRUE, then every time a split is possibile during the game it is performed. If FALSE the split is never performed.

Value

A alicetwist game object.

Examples

1

msaltieri/alicetwist documentation built on May 23, 2019, 7:50 a.m.