A minor bug + I forgot something yesterday

in programming •  5 years ago 

So I posted the code in repl.it (which is a clever site if you want to share code that can be executed directly on the site).
https://repl.it/repls/BewitchedLightbluePdf
Just please don't edit the code :)
the interactive part you can have fun, but the white part you should leave as is.

it should contain this code

variable deck 60 cells allot

: new-deck 52 0 do I dup cells deck + ! loop ;

: card@ dup cells deck + @ ;
: card! cells deck + ! ;
: swap-card card@ rot card@ rot swap card! swap card! ; 

variable rnd  here rnd !
: random  rnd @ 31421 *  6927 +  dup rnd ! ;
: choose  random um* nip ;

: shuffler 10000 0 do 2dup choose choose swap-card loop drop drop ;

There was a bug in the shuffle routine I did not catch.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @iobates! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 600 posts. Your next target is to reach 650 posts.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

SteemitBoard supports the SteemFest⁴ Travel Reimbursement Fund.
Vote for @Steemitboard as a witness to get one more award and increased upvotes!