https://github.com/sambecker/rustwar
Simulation designed to determine the average length (with and without shuffling) of a game of war
https://github.com/sambecker/rustwar
Last synced: about 1 month ago
JSON representation
Simulation designed to determine the average length (with and without shuffling) of a game of war
- Host: GitHub
- URL: https://github.com/sambecker/rustwar
- Owner: sambecker
- Created: 2021-10-14T05:00:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-07T04:32:17.000Z (about 4 years ago)
- Last Synced: 2025-03-04T11:43:47.439Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 863 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# War
How long does it take for a game of war to end?
### Run simulation
`cargo run`
### Test simulation
`cargo test`
### Simulation output
```
STARTING SIMULATION (MAX GAME LENGTH: 10000 TURNS)
Games: 100000 [SHUFFLED ] 233.32 (Indeterminate games: 0.00%)
Games: 100000 [SHUFFLED ] 232.75 (Indeterminate games: 0.00%)
Games: 100000 [UNSHUFFLED] 565.19 (Indeterminate games: 8.15%)
Games: 100000 [UNSHUFFLED] 563.28 (Indeterminate games: 8.10%)
SIMULATION FINISHED (47 SECONDS)
```
### Simulation preview
