-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.py
24 lines (20 loc) · 819 Bytes
/
game.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
# Game class - handles logic of entire game
from numpy import ndarray, empty
class Game:
def __init__(
self, board_size: tuple = None, players: int = None, bases: list = None
):
"""
Game class handling logic and class interactions.
Parameters
----------
board_size : tuple, optional; default=(12, 12)
Size of board x, y
players : int, optional; default=2
# of players
bases : list, optional; default=[[0,0], [board_size[0], board_size[1]]]
Position of starting bases for bases[n] nth player
"""
self.board_size = board_size if board_size else (12, 12)
self.players = players if players else 2
self.bases = bases if bases else [[0, 0], [board_size[0], board_size[1]]]