Rock-paper-scissors: Difference between revisions

m
→‎{{header|Sidef}}: minor code fix
(Added Lua version)
m (→‎{{header|Sidef}}: minor code fix)
Line 4,212:
# compute ai choice for next play
given (var rn = (plays.rand.int)) {
whencase (rn < pcf[0]) { aChoice = 1 }
whencase (pcf[0]+pcf[1] > rn) { aChoice = 2 }
default { aChoice = 0 }
}
2,747

edits