git.alexw.nyc home about git garden
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
\ Not done
0 value total

0 const rock
1 const paper
2 const scissors 

\ slightly broken atm
: score ( n1 n2 -- n3 ) dup >r 1+ swap - 3 mod 3 * V1 1+ + rdrop ;

: A ( -- n ) rock ; 
: B paper ; 
: C scissors ; 
: X ( n -- ) rock score to+ total ;
: Y paper score to+ total ;
: Z scissors score to+ total ;

f<< /aoc/input
total . nl>