| import argparse | |||||
| from random import randint, shuffle | from random import randint, shuffle | ||||
| class Sibling: | class Sibling: | ||||
| print(out_str) | print(out_str) | ||||
| if __name__ == "__main__": | if __name__ == "__main__": | ||||
| gs = GameState(rounds=100000, siblings=3, common_brother=True, verbose=False) | |||||
| parser = argparse.ArgumentParser() | |||||
| parser.add_argument("-r", "--rounds", help="Number of game rounds to simulate", type=int, nargs="?", default=10000, const=10000) | |||||
| parser.add_argument("-s", "--siblings", help="Number of players", type=int, nargs="?", default=3, const=3) | |||||
| parser.add_argument("-c", "--common_brother", help="The siblings share a brother, instead of each having their own", action="store_true") | |||||
| parser.add_argument("-b", "--brother_count", help="How many times can a brother overwhelm a sibling?", type=int, nargs="?", default=3, const=3) | |||||
| parser.add_argument("-v", "--verbose", help="Each round prints its results", action="store_true") | |||||
| args = parser.parse_args() | |||||
| gs = GameState(rounds=args.rounds, siblings=args.siblings, common_brother=args.common_brother, brother_count=args.brother_count, verbose=args.verbose) |