-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.py
More file actions
25 lines (24 loc) · 762 Bytes
/
game.py
File metadata and controls
25 lines (24 loc) · 762 Bytes
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
##########################################################################
## game.py
##
## Represents a single 4-player game running on the server
##
## by Andrew Francis
##########################################################################
from board import Board
from player import Player
from constants import *
class Game:
def __init__(self, name, gui):
self.name = name
if gui:
self.board = Board()
else:
self.board = Board(server=True)
self.players = []
for color in PLAYER_COLORS:
if gui:
self.players.append(Player(self.board, color))
else:
self.players.append(Player(self.board, color, server=True))
self.turn = -1