customGame

fun customGame(gameMode: Game.GameMode, threeRepetitionsMode: Game.ThreeRepetitionsMode, fiftyMovesRuleMode: Game.FiftyMovesRuleMode, initialFen: String? = null, initialTags: Map<String, String>? = null, idSupplier: () -> Any? = { null }): Game

Creates a new Game instance with fully customizable parameters. Allows setting the game mode, rule enforcement, initial FEN, and PGN tags.

Return

a customized Game

Since

1.0.0-beta.1

Author

lunalobos

Parameters

gameMode

the game mode

threeRepetitionsMode

the three repetitions mode

fiftyMovesRuleMode

the fifty moves rule mode

initialFen

the initial fen for thematics games

initialTags

the initial tags of the game

idSupplier

a lambda that provides different IDs each time it is called

Throws

for bad initial fen string