Rock-paper-scissors: Difference between revisions

m (→‎traditional, 3 choices: aligned some statements.)
Line 3,838:
me: 2 7 1
</pre>
 
=={{header|Phixmonti}}==
<lang Phixmonti>include ..\Utilitys.pmt
 
 
0 var wh
0 var wc
( "Scissors cuts Paper"
"Paper covers Rock"
"Rock crushes Lizard"
"Lizard poisons Spock"
"Spock smashes Scissors"
"Scissors decapites Lizard"
"Lizard eats Paper"
"Paper disproves Spock"
"Spock vaporizes Rock"
"Rock blunts Scissors" )
"'Rock, Paper, Scissors, Lizard, Spock!' rules are: " ? nl
len for
get ?
endfor
nl
( ( "S" "Scissors" ) ( "P" "Paper" ) ( "R" "Rock" ) ( "L" "Lizard" ) ( "K" "Spock" ) )
 
true while
"Choose (S)cissors, (P)paper, (R)ock, (L)izard, Spoc(K) or (Q)uit: " input nl upper
dup "Q" == if
nl drop false
else
getd if
dup "You choose " print ? var he
rand 5 * int 1 + 2 2 tolist sget
dup "I choose " print ? var ce
he ce == if
"Draw" ?
else
swap len for
get dup
split 2 del
he ce 2 tolist
over over == rot rot reverse == or if exitfor else drop endif
endfor
dup ?
he find 1 == if wh 1 + var wh "You win!" else wc 1 + var wc "I win!" endif ? drop
swap
endif
else
print " is a invalid input!" ?
endif
true
endif
endwhile
drop drop
"Your punctuation: " print wh ?
"Mi punctuation: " print wc ?
wh wc > if "You win!" else wh wc < if "I win!" else "Draw!" endif endif ?
enddef</lang>
 
=={{header|PHP}}==
672

edits