ttt_human: Human Tic-Tac-Toe Player

Description Usage Arguments Value Examples

View source: R/ttt_human.R

Description

Create an human tic-tac-toe player

Usage

1
ttt_human(name = "no name")

Arguments

name

player name

Value

ttt_human object

Fields

name

Player name

Methods

getmove(game, prompt = "choose move (e.g. A1) > ", ...)

Communicate with users to type in the next move.

Input:

  • game: ttt_game object

  • prompt: prompt message

Output: a character of a move

Examples

1
2
3
4
5
## Not run: 
p <- ttt_human()
p$getmove()

## End(Not run)

kota7/tictactoe documentation built on May 20, 2019, 1:11 p.m.