TicTacToe

com.phasmidsoftware.gryphon.applications.game.TicTacToe
case class TicTacToe(board: TicTacToeSquare) extends Game[Option[Boolean], TicTacToeSquare, TicTacToePlayer]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Game[Option[Boolean], TicTacToeSquare, TicTacToePlayer]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def goal(board: TicTacToeSquare): Option[Option[TicTacToePlayer]]

If the result of invoking goal exists, then the game is over. If there is a winner, then the optional value is Some(winner). Otherwise, the game is a draw (stalemate) and the result is Some(None).

If the result of invoking goal exists, then the game is over. If there is a winner, then the optional value is Some(winner). Otherwise, the game is a draw (stalemate) and the result is Some(None).

Value parameters

board

the game board.

Attributes

Returns

an Option of Option[Player]

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product