Move

com.phasmidsoftware.gryphon.games.Move
trait Move[Board, Player] extends (Board, Player) => (Board, Player)

Trait to model a move in a game. Normally, a player transfers/receives some sort of token to/from the board, and/or receives/transfers a token back. The net effect of this might be that the token has moved on the board.

Type parameters

Board

the board type.

Player

the player type.

Attributes

Graph
Supertypes
trait (Board, Player) => (Board, Player)
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def curried: Board => Player => (Board, Player)

Creates a curried version of this function.

Creates a curried version of this function.

Attributes

Returns

a function f such that f(x1)(x2) == apply(x1, x2)

Inherited from:
Function2
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function2 -> Any
Inherited from:
Function2
def tupled: ((Board, Player)) => (Board, Player)

Creates a tupled version of this function: instead of 2 arguments, it accepts a single scala.Tuple2 argument.

Creates a tupled version of this function: instead of 2 arguments, it accepts a single scala.Tuple2 argument.

Attributes

Returns

a function f such that f((x1, x2)) == f(Tuple2(x1, x2)) == apply(x1, x2)

Inherited from:
Function2

Inherited and Abstract methods

def apply(v1: Board, v2: Player): (Board, Player)

Applies the body of this function to the arguments.

Applies the body of this function to the arguments.

Value parameters

v1

the 1st argument of type T1

v2

the 2nd argument of type T2

Attributes

Returns

the result of function application.

Inherited from:
Function2