private int currentPlayer = 0;

public PacmanState move(Position to){
    //...
    newState.score = this.score + 1;
    newState.currentPlayer = 1;
    return newState;
}

public PacmanState moveGhost(Position from, Position to){
    //...
    resState.score = this.score;
    resState.currentPlayer = (currentPlayer + 1) % (this.findGhosts().length + 1);
    return resState;
}

public int getCurrentPlayer(){
    return this.currentPlayer;
}
