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):
|
||||
raise NotImplementedError()
|
||||
|
||||
def chooseAtkAction(self):
|
||||
def chooseAtkAction(self, actionDic, opposingSkater):
|
||||
"""Picks an action/target node combo."""
|
||||
predAction = self.predictOpposingAction(opposingSkater)
|
||||
raise NotImplementedError()
|
||||
|
||||
def chooseDefAction(self):
|
||||
|
|
6
team.py
6
team.py
|
@ -3,8 +3,8 @@ from random import sample
|
|||
|
||||
class Team(object):
|
||||
"""A team of either 6 or 10 skaters and 1-3 goalies."""
|
||||
roster = [] #ordered, first line then second line; (#, name)
|
||||
goalies = [] # (#, name)
|
||||
roster:list[Player] = [] #ordered, first line then second line; (#, name)
|
||||
goalies:Player = [] # (#, name)
|
||||
name = None
|
||||
shortname = None
|
||||
|
||||
|
@ -19,4 +19,4 @@ class Team(object):
|
|||
|
||||
|
||||
def chooseGoalie(self):
|
||||
return sample(self.goalies,1)
|
||||
return sample(self.goalies,1)[0]
|
Loading…
Reference in a new issue