2021-07-14 22:05:03 -07:00
|
|
|
import game, simulation, ui
|
2021-03-24 10:54:50 -07:00
|
|
|
|
|
|
|
|
2021-07-12 15:46:06 -07:00
|
|
|
when isMainModule:
|
|
|
|
let config = parseArgs()
|
|
|
|
var b: Board
|
|
|
|
b.init
|
|
|
|
b.setState(config.state, [])
|
|
|
|
b.diceRolled = config.diceRolled
|
2021-07-14 22:05:03 -07:00
|
|
|
echo b.showSpaces(1, 16)
|
2021-07-13 15:54:54 -07:00
|
|
|
let legScores = b.getLegScores
|
2021-07-14 22:05:03 -07:00
|
|
|
echo "\nCurrent leg probabilities:"
|
|
|
|
echo legScores.showPercents()
|
2021-07-13 15:54:54 -07:00
|
|
|
|
|
|
|
let gameScores = b.randomGames(1_000_000)
|
|
|
|
echo "\nFull game probabilities (1M simulations):"
|
2021-07-14 22:05:03 -07:00
|
|
|
echo gameScores.showPercents()
|