fleshed out GameLogic a bit
* added time counting stub * added score counting stub * added win check stub * made it so you pass gameMap to the logic * you pass the list of players too (both gameMap and playerList are assumed to be made outside when configuring the game) *
This commit is contained in:
parent
a32d984e0c
commit
c9b24edd8e
33
GameLogic.py
33
GameLogic.py
@ -1,2 +1,35 @@
|
|||||||
|
from GameMap import *
|
||||||
|
from Player import *
|
||||||
|
|
||||||
class GameLogic():
|
class GameLogic():
|
||||||
|
|
||||||
|
def __init__(self, gameMap, playerList, winRowLength, individualMoves):
|
||||||
|
|
||||||
|
self.gameMap = gameMap
|
||||||
|
self.playerList = playerList
|
||||||
|
self.winRowLength = winRowLength
|
||||||
|
self.individualMoves = individualMoves
|
||||||
|
self.time = 0 # in seconds
|
||||||
|
self.score = 0
|
||||||
|
|
||||||
|
self.wait_for_input()
|
||||||
|
|
||||||
|
|
||||||
|
def wait_for_input(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def check_for_win(self, playerList):
|
||||||
|
for player in playerList:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_time(self):
|
||||||
|
return self.time
|
||||||
|
|
||||||
|
|
||||||
|
def reset_time(self):
|
||||||
|
self.time = 0
|
||||||
|
|
||||||
|
|
||||||
|
def get_score(self):
|
||||||
|
return self.score
|
Loading…
Reference in New Issue
Block a user