Fix an issue when joining as observer
@@ -44,6 +44,8 @@ class Observer(AbstractPlayer):
class Player(AbstractPlayer):
@classmethod
def from_proto(cls, proto):
+ if PlayerType(proto.type) == PlayerType.Observer:
+ return cls(proto.player_id, PlayerType(proto.type), None, None, None)
return cls(
proto.player_id,
PlayerType(proto.type),
