aboutsummaryrefslogtreecommitdiff
path: root/almost-finished.json
AgeCommit message (Collapse)AuthorLines
2019-02-17Split Solvitaire k+ moves into stock movesTom Harley-12/+0
In Solvitaire, going through the stock in stock-waste games is bundled with the move out of the waste, in what's called a k-plus move. This makes sense in Solvitaire, but in this system having each stock move be explicit helps because it itemises all moves similarly, making shaving off single moves easy. The `calculate_stock_moves` function uses a simulation rather than a simple calculation, which has a couple of downsides: 1. it's slower than a calculation; 2. it loops infinitely when given an index that's impossible to reach.
2019-01-29Add support for reading gamestates from json filesTom Harley-0/+12
Piles of cards can now be read from `.json` files using the `--game`/`-g` flag, although the solver doesn't seem to like them. Currently, cards mentioned in these files are all face-up, which means that they aren't particularly useful for building whole games and more just test cases. Also added command-line options parsing, including accepting randomisation seeds from the `--seed`/`-s` option.