CL Simplex

Game of Thrones House Picker

Game of Thrones House Picker

We really like the Game of Thrones board game (2nd edition). As far as our board game sessions go, we play thrones frequently. Often, we write a quick script to randomize our factions (it is not easy to win as Lannister).

Enter our long term solution! Introducing the Faction Randomizer (also supports Axis and Allies, but it's a different file in the repository). It's written in Python 3 and is licensed under a 'Free - as in Free Beer' license.

Example Usage

Copy the code into a python file, clone the repo - whatever you want to get the file on your machine. You can import it and use the randomize() function (passing it an array of names) within your own code. Alternatively, and perhaps easier, you can use it as a command-line utility:

python3 game_of_thrones.py Bob Sue Joe Jane Randall Jacob

Return Values

From here, you'll get a python dictionary of the form:

{ 'Randall': 'BARATHEON', 'Bob': 'LANNISTER', 'Joe': 'STARK', 'Sue': 'GREYJOY', 'Jacob': 'TYRELL', 'Randall': 'MARTELL' }

Game of Thrones House Picker

Navigation

Tap or click on these posts to navigate to the next or previous posts.