10 lines
392 B
Plaintext
10 lines
392 B
Plaintext
|
# %s/\(.\) \(.\)/"\1\2"_/
|
|||
|
# %s/_$//
|
|||
|
DecodeChar ← ((@S|@P)↥=@B∶=@Y.|⋅∘∶@R)↥=@A∶=@X..
|
|||
|
CharValue ← |1 ⋅∘∶/(((3|2)=@P|⋅∘∶1)=@R.DecodeChar)
|
|||
|
Battle ← ×3+1↥¯1↧1(∘|¯∘)×=0◿2,≠0.¯/-∵(⋅∘∶(=@P.|2)=@S.)
|
|||
|
BattleChar ← |1 +CharValue∶Battle⊂/DecodeChar.
|
|||
|
# @A_@X Rock -- @R
|
|||
|
# @B_@Y Paper -- @P
|
|||
|
# @C_@Z Scissors -- @S
|
|||
|
/+≡BattleChar <input>
|