GameResult

com.phasmidsoftware.gambit.game.Player$package.GameResult
object GameResult

Companion for GameResult providing factory methods.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GameResult.type

Members list

Value members

Concrete methods

def draw[Pl](players: Seq[Pl]): GameResult[Pl]

Draw among the given players: all score 0.

Draw among the given players: all score 0.

Attributes

def score[Pl](result: GameResult[Pl], player: Pl): Int

Extract a single player's score from a result, defaulting to 0.

Extract a single player's score from a result, defaulting to 0.

Attributes

def win[Pl](winner: Pl, loser: Pl): GameResult[Pl]

Two-player win: winner scores +1, loser scores -1.

Two-player win: winner scores +1, loser scores -1.

Attributes