Skip to content

Commit c409fcd

Browse files
committed
API (restart): raise exception when observer attempts to restart game
1 parent b5194d2 commit c409fcd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

client/game_server_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ def restart(self):
266266
Raises:
267267
GameServerError: in case the game could not be restarted
268268
"""
269+
if self._observer: raise GameServerError('cannot restart game as observer')
270+
269271
_, err, _ = self._send({
270272
'type':'restart',
271273
'game':self._game,

0 commit comments

Comments
 (0)