For anyone who knows me, they know I'm a bit of a tabletop gaming nerd. I've played a lot of Dominion, but I recently picked up the Trains board game. I've used randomizers for Dominion for a long time (dealing with the randomizer cards kind of sucks), but I couldn't track down a randomizer for Trains. Since there was a lack of randomizer, I decided to hack one out really quick one day.
If anyone is interested in using just the “API”, feel free to do so. It is just a cgi page that takes some options and returns some JSON. The base “API” CGI lives at http://trains.splitstreams.com/trains.cgi. Here are the different query string options:
|shreq||1||If this is set, the standard required cards will also be returned|
|pp||1||This is mainly used for testing/debugging. It will “pretty print” out your results|
As you can see, this is pretty simple. If you want to generate a JSON response with all options set, just do http://trains.splitstreams.com/trains.cgi?shreq=1&pp=1.
If anyone is actually interested in getting the source for this, let me know. It's not very good (one more time, totally hacked this out one afternoon), but just send me an email and I could add it to github or something. Otherwise, use the site/API as you desire.