Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/dc
- 1:p 0:p # starting positions
- 0dsp sr # set player and roll to zero
- [ lrd100%r1+sr ] SR # put die roll on stack while updating r
- [ lRddxrx+rx+3+ ] SS # roll three times and sum
- [
- lSx # roll
- lp;p+1-10%1+ dlp:p # (p(p) = (p(p) + roll - 1) % 10 + 1) new-p(p) on stack
- lp;s + dlp:s # (s(p) = (s(p) + new p(p))) new-s(p) on stack
- lp1r-sp # toggle player
- 1000>L # loop if new-s(p) < 1000
- ] SL
- lLx
- [Part 1: ]n lp;s lr*p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement