-
Notifications
You must be signed in to change notification settings - Fork 23
/
app.py
27 lines (22 loc) · 888 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from __future__ import division, print_function
import arguments
from Game import Game
from bots import *
from Player import Player
# Change these to edit the default Game parameters
DEFAULT_VERBOSITY = True
DEFAULT_MIN_ROUNDS = 300
DEFAULT_AVERAGE_ROUNDS = 1000
DEFAULT_END_EARLY = False
DEFAULT_PLAYERS = [Player(), Pushover(), Freeloader(), Alternator(), MaxRepHunter(), Random(.2), Random(.8)]
# Bare minimum test game. See README.md for details.
if __name__ == '__main__':
(players, options) = arguments.get_arguments()
# The list of players for the game is made up of
# 'Player' (your strategy)
# bots from get_arguments (the bots to use)
player_list = players
# **options -> interpret game options from get_arguments
# as a dictionary to unpack into the Game parameters
game = Game(player_list, **options)
game.play_game()