Files
centvrion/examples/rock_paper_scissors.cent
2026-04-21 23:46:00 +02:00

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!")
}