18 lines
541 B
Plaintext
18 lines
541 B
Plaintext
// Rock, paper, scissors against the computer
|
|
CVM FORS
|
|
|
|
DESIGNA choices VT ["PETRA", "CHARTA", "FORFEX"]
|
|
DESIGNA compvter VT FORTVITA_ELECTIO(choices)
|
|
DIC("Choose: PETRA (rock), CHARTA (paper), or FORFEX (scissors)")
|
|
DESIGNA player VT AVDI()
|
|
|
|
DIC("Computer chose:", compvter)
|
|
|
|
SI player EST compvter TVNC {
|
|
DIC("Draw!")
|
|
} ALIVD SI (player EST "PETRA" ET compvter EST "FORFEX") AVT (player EST "CHARTA" ET compvter EST "PETRA") AVT (player EST "FORFEX" ET compvter EST "CHARTA") TVNC {
|
|
DIC("You win!")
|
|
} ALIVD {
|
|
DIC("Computer wins!")
|
|
}
|