Rock-paper-scissors: Difference between revisions

m
→‎traditional, 3 choices: aligned some statements.
m (→‎extended, 5 choices: added whitespace.)
m (→‎traditional, 3 choices: aligned some statements.)
Line 4,390:
b.p= 'covers'; b.s= "cuts" ; b.r= 'breaks' /*verbs: how the choice wins. */
 
do forever; say; say prompt; say prompt; say /*prompt the CBLF; then get a response.*/
c= word($.p $.s $.r, random(1, 3) ) /*choose the computer's first pick. */
m= max(@.r, @.p, @.s); c= w.r /*prepare to examine the choice history*/
if @.p==m then c= w.p /*emulate JC's: The Amazing Karnac. */