//main関数内 if(player1 == player2){ judge = 3;//あいこの場合 }else{ player1 = player % 3;//相手との差を求める if(player1 + 1 == player2){ judge = 1;//P1が勝ち }else{ judge = 2;//あいこは条件から外れているのでP2の勝ち } }