Created
November 29, 2019 16:41
-
-
Save TanisukeGoro/e6b871087b07ec82fc13e5eb8749ecf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// こういうのが | |
if(r2==1){ | |
view4 = list1[0]; | |
} | |
if(r2==2){ | |
view4 = list1[1]; | |
} | |
if(r2==3){ | |
view4 = list1[2]; | |
} | |
// こんな感じに書ける | |
view4 = list[judge(相手の手, 自分の手)] | |
// 判定して1~3の値を返す関数 | |
function judge(hand1, hand2){ | |
// 判定の式を書く | |
// return で1~3の値が返るようにする | |
return hantei_kekka | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment