Learn R Programming

rt3 (version 0.1.2)

playGame: Play a game of Tic-Tac-Toe using the two provided stragies.

Description

Play a game of Tic-Tac-Toe using the two provided stragies.

Usage

playGame(px, po)

Arguments

px
The X player strategy.
po
The O player strategy.

Value

gameState The final gameState after playing a full game.

Examples

Run this code
px <- firstAvailableMovePlayer
py <- randomMovePlayer
finalGameState <- playGame(px,py)

Run the code above in your browser using DataLab