eseidel / war_sim

Answer questions about the card game "war" via simulation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

war_sim

Answer questions about the card game "war" via simulation.

TL;DR

War takes a really long time to play.

Example

$ dart run
Simulating with rules "Cards per War = 1" N=50000
Rounds: 320.0 (median)
Wars: 19.0 (median)
Simulating with rules "Cards per War = 3" N=50000
Rounds: 320.0 (median)
Wars: 20.0 (median)
Simulating with rules "Cards per War = 0" N=50000
Rounds: 466.0 (median)
Wars: 28.0 (median)

TODO

  • Support more rule variants.

About

Answer questions about the card game "war" via simulation.

License:MIT License


Languages

Language:Dart 100.0%