You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sorry I didn't consider this sooner, but if your hunt_choices is returning something that isn't a list, it will probably crash the game, and if it returns a list of the long length, it will probably have nonsensical results.
I would fix this bug, but between github outages and my being stretch for time I haven't really had the opportunity to add a fix and the deadline is in less than three days. Furthermore, anything I do would almost certainly behave differently from the server, which will purportedly replace errors with "all slacking".
Rather than tinker with this further and risk a last-minute screwup or expectation mismatch, I figured I'd just post what I'd do so people can do this locally if they want the sanity check.
In Game.py, outside of the class:
def valid_choices(L, n):
'''Sanity check for hunt_choices'''
return (type(L) == list
and len(L) == n
and all(_ == 'h' or _ == 's' for _ in L))
In Game.play_round, after getting strategy from a player:
if not valid_choices(strategy, self.P):
# handle errors however you want
The text was updated successfully, but these errors were encountered:
I'm sorry I didn't consider this sooner, but if your
hunt_choices
is returning something that isn't a list, it will probably crash the game, and if it returns a list of the long length, it will probably have nonsensical results.I would fix this bug, but between github outages and my being stretch for time I haven't really had the opportunity to add a fix and the deadline is in less than three days. Furthermore, anything I do would almost certainly behave differently from the server, which will purportedly replace errors with "all slacking".
Rather than tinker with this further and risk a last-minute screwup or expectation mismatch, I figured I'd just post what I'd do so people can do this locally if they want the sanity check.
In
Game.py
, outside of the class:In
Game.play_round
, after gettingstrategy
from a player:The text was updated successfully, but these errors were encountered: