class GameState:
    def __init__(self, players, highscore, currentPlayer = 1):
        self.players = players
        self.currentPlayer = currentPlayer
        self.highscore = highscore

    def currentPlayer(self):
        return self.players[0]

    def setCurrentPlayer(self, playerId):
        if(playerId > len(self.players)):
            pass # todo throw error

        savedPlayer = self.players[0]
        self.players[0] = filter(lambda x: playerId == x.id, self.players)
        self.players.remove(savedPlayer)
        self.players.append(savedPlayer)
