Matchbox

com.phasmidsoftware.gambit.examples.tictactoe.Matchbox
See theMatchbox companion class
object Matchbox

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Matchbox.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(openCells: Seq[Int]): Matchbox

Construct a fresh Matchbox for a position with the given open cells. Each open cell starts with initialBeads beads.

Construct a fresh Matchbox for a position with the given open cells. Each open cell starts with initialBeads beads.

Value parameters

openCells

sequence of open cell indices (0..8, row-major).

Attributes

Returns

a new Matchbox.

Construct a Matchbox from a TicTacToe position. Open cells are derived from the board's open sequence, converted to flat indices.

Construct a Matchbox from a TicTacToe position. Open cells are derived from the board's open sequence, converted to flat indices.

Value parameters

ttt

the TicTacToe position.

Attributes

Returns

a new Matchbox with one entry per open cell.

Concrete fields

val beadFloor: Int

Minimum beads per move — never zero so the move remains selectable.

Minimum beads per move — never zero so the move remains selectable.

Attributes

val initialBeads: Int

Initial bead count per move. Original MENACE used 4 for the opening, tapering down.

Initial bead count per move. Original MENACE used 4 for the opening, tapering down.

Attributes

val lossDelta: Int

Beads removed from each move in the losing matchboxes.

Beads removed from each move in the losing matchboxes.

Attributes

val winDelta: Int

Beads added to each move in the winning matchboxes.

Beads added to each move in the winning matchboxes.

Attributes