Skip to content

Instantly share code, notes, and snippets.

@BMuscle
Last active August 29, 2019 05:57
Show Gist options
  • Select an option

  • Save BMuscle/9f0c6ee292d10b9c70dccf0cf25c294e to your computer and use it in GitHub Desktop.

Select an option

Save BMuscle/9f0c6ee292d10b9c70dccf0cf25c294e to your computer and use it in GitHub Desktop.
じゃんけんソース③
//main関数内
if(player1 == player2){
judge = 3;//あいこの場合
}else{
player1 = player % 3;//相手との差を求める
if(player1 + 1 == player2){
judge = 1;//P1が勝ち
}else{
judge = 2;//あいこは条件から外れているのでP2の勝ち
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment