def play_round(self, request): """Plays a round. Returns a game state""" return GameHandler.play_round(request)
def get_game(self, request): """Return the current game state.""" return GameHandler.get_game(request)
def new_game(self, request): """Creates a new Rock-Paper-Scissors game""" return GameHandler.new_game(request)
def get_game_history(self, request): """Returns the round-by-round result of an active or completed Game.""" return GameHandler.get_game_history(request)
def cancel_game(self, request): """Cancels an active game. The game must belong to current user.""" GameHandler.cancel_game(request) return StringMessage(message='The game has been successfully cancelled!')
def get_user_games(self, request): """Returns all of the currently authenticated User's games""" return GameHandler.get_user_games()