//Solitaire/de.syntaktischer.zucker.Solitaire/Board
[jvm] data class Board(pegs: MutableMap<Pair<Int, Int>, Peg>, moves: Int)
A representation of the solitaire board
The game board consists out of pegs and holes A peg is present (1), a hole is present (0) and we are outside the board boundary (-1) Layout: | ————————————— | 1 | -1 | -1 | 1 | 1 | 1 | -1 | -1 | -1 | ————————————— | -1 | -1 | -1 | 1 | 1 | 1 | -1 | -1 | -1 | ————————————— | -1 | -1 | -1 | 1 | 1 | 1 | -1 | -1 | -1 | ————————————— | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ————————————— | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | ————————————— | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ————————————— | -1 | -1 | -1 | 1 | 1 | 1 | -1 | -1 | -1 | ————————————— | -1 | -1 | -1 | 1 | 1 | 1 | -1 | -1 | -1 | ————————————— | -1 | -1 | -1 | 1 | 1 | 1 | -1 | -1 | -1 | ————————————— |
jvm
Name | Summary |
---|---|
pegs | building blocks of board |
size | dimensions (x and y) of board |
Name | Summary |
---|---|
Board | [jvm] fun Board(pegs: MutableMap<Pair<Int, Int>, Peg>, moves: Int = 0)building blocks of board |
Name | Summary |
---|---|
component1 | [jvm] Content operator fun component1(): MutableMap<Pair<Int, Int>, Peg> |
component2 | [jvm] Content operator fun component2(): Int |
copy | [jvm] Content fun copy(): Board fun copy(pegs: MutableMap<Pair<Int, Int>, Peg>, moves: Int = 0): Board |
equals | [jvm] Content open operator override fun equals(other: Any?): Boolean |
hashCode | [jvm] Content open override fun hashCode(): Int |
numPegs | [jvm] Content fun numPegs(): Int |
toString | [jvm] Content open override fun toString(): String |
Name | Summary |
---|---|
moves | [jvm] val moves: Int = 0 |
pegs | [jvm] val pegs: MutableMap<Pair<Int, Int>, Peg>building blocks of board |