toAnalisis

fun toAnalisis(idSupplier: () -> Any? = { null }): Game

Creates a deep copy of this game, converting its mode to GameMode.ANALYSIS and setting both repetition rules to ThreeRepetitionsMode.AWARE and FiftyMovesRuleMode.AWARE. This makes the new instance fully mutable for analysis.

The idea behind idSupplier is to give the developer the flexibility to provide their own ID generator (idSupplier()). This allows the object's ID to be custom-defined, which aids the developer in various operations such as serializing the object, indexing it in an in-memory or on-disk database, or leveraging the ID in any way that facilitates or enables operations.

Return

the analysis deep copy of this Game

Since

1.0.0-beta.1

Parameters

idSupplier

a lambda that provides different IDs each time it is called