forked from KevinFrazier/CitrusHack2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameSequence.py
56 lines (43 loc) · 1.34 KB
/
GameSequence.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from Player import Player
class GameSequence:
'''
GameSequence summary: Keeps track of player turn sequence and Game end
Functionalities
-start game
-must start turns
-change turns
-end turns
-end game
'''
def __init__(self, ArrayofPlayers):
if (len(ArrayofPlayers) < 2):
return False
self.players = ArrayofPlayers
self.currentTurn = None
NOTHING = 2
ATTACK = 1
MOVE = 0
self.modes = [MOVE, ATTACK,NOTHING]
self.currentMode = NOTHING
def changeMode(self,number):
self.currentMode = self.modes[number]
def startGame(self):
self.currentTurn = 0
'''
does some intro animaton -> starts game
'''
return
def startTurn(self):
self.players[self.currentTurn].changeTurn(True)
'''
maybe some camera change animation to player location
'''
return
def getCurrentPlayer(self):
return self.players[self.currentTurn]
def changeTurn(self):
self.players[self.currentTurn].changeTurn(False)
self.currentTurn += 1
self.currentTurn = self.currentTurn % len(self.players)
def endTurn(self):
self.players[self.currentTurn].changeTurn(False)