This is the first program I made from scratch without a template or tutorial, in PICO-8.

It takes a set of data, in this case four card values, and rearranges them into a shuffled deck which can then be called upon by something else. In order to prove it works, it displays the whole shuffled deck, but one could just as easily hide the results, and draw from the deck instead.

I think I could even write a "draw" function which reveals the 'deck' table's first variable, and then moves each variable one index-value lower...!

This took me a week to figure out, and the night before I wrote this code I was feeling very discouraged. The next morning, I walked through the steps in my head, in the, shower, and I knew what I had to do. I had to go to work though, so to make sure I didn't forget what I hoped was a solution, I wrote the code down on the back of a receipt.

Fortunately, it worked!

I don't understand why the display window is acting weird though.

Published Mar 16, 2017
Made withPICO-8
Tagslearning, PICO-8