Board-class: The Board Class

Description Usage Arguments Value Methods (by generic) Slots

Description

This object container manages the active state of the game.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'Board'
show(object)

## S4 method for signature 'Board'
considerInstance(board)

## S4 method for signature 'Board'
checkGuess(board, guess)

Arguments

object, board

The most recent Board object.

guess

Guess input from askPlayer.

Value

A character vector of clue(s).

An updated Board object.

Methods (by generic)

Slots

words

A character vector. The 25 prompts on the Board.

spies

A character vector. The 25 "spies" (i.e., "R", "B", "N", or "K").

team

A character scalar. The active team (i.e., "R" or "B").

intended

A logical vector. Effectively @spies == @team.

onboard

A logical vector. Which of the 25 "spies" no team has yet exposed.

history

A character vector. All clues given to date. Used for AI.

lastguess

A logical scalar. Whether team made last guess correctly.

endgame

A logical scalar. Whether the game is finished.

winner

A character scalar. The winning team (i.e., "R" or "B").


tpq/codenames documentation built on May 31, 2019, 6:50 p.m.