adjusted some zhings for new game.py functionality
This commit is contained in:
parent
6b34a7077a
commit
b1106f23d5
|
@ -81,7 +81,9 @@ class Player(object):
|
||||||
def predictOpposingAction(self, opposingSkater):
|
def predictOpposingAction(self, opposingSkater):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def chooseAtkAction(self):
|
def chooseAtkAction(self, actionDic, opposingSkater):
|
||||||
|
"""Picks an action/target node combo."""
|
||||||
|
predAction = self.predictOpposingAction(opposingSkater)
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def chooseDefAction(self):
|
def chooseDefAction(self):
|
||||||
|
|
6
team.py
6
team.py
|
@ -3,8 +3,8 @@ from random import sample
|
||||||
|
|
||||||
class Team(object):
|
class Team(object):
|
||||||
"""A team of either 6 or 10 skaters and 1-3 goalies."""
|
"""A team of either 6 or 10 skaters and 1-3 goalies."""
|
||||||
roster = [] #ordered, first line then second line; (#, name)
|
roster:list[Player] = [] #ordered, first line then second line; (#, name)
|
||||||
goalies = [] # (#, name)
|
goalies:Player = [] # (#, name)
|
||||||
name = None
|
name = None
|
||||||
shortname = None
|
shortname = None
|
||||||
|
|
||||||
|
@ -19,4 +19,4 @@ class Team(object):
|
||||||
|
|
||||||
|
|
||||||
def chooseGoalie(self):
|
def chooseGoalie(self):
|
||||||
return sample(self.goalies,1)
|
return sample(self.goalies,1)[0]
|
Loading…
Reference in a new issue