Today marks the 156th anniversary of the law creating the United States nickel.
And if I had a nickel for every time we talked about code…
No? Whatever, nobody reads this for the segue.
I recently needed a little desktop holder and charging station for a small tablet computer. In some cases, I use and recommend a wall-mounted plate hanger—some hooks and springs used to display decorative plates, that you can usually find in your local hardware store for a couple of dollars in various sizes, and online —because it keeps the tablet out of the way, and keeps all the faces but the back accessible. If you don’t plan to move the tablet frequently, those work wonderfully.
However, in this case, I wanted something more like a small “docking station,” keeping the tablet elevated enough to see the screen, but also movable on the desk or counter. I pulled out my little cardboard knife that I usually use to break down boxes, and have occasionally used to cleanly run a conduit through a window without leaving the window wide open.
I winged it, and the first pass came out fairly close to what I wanted. The connecting bars—a last-minute idea to avoid cutting half-length slots on the side pieces to cross them—look a bit sloppy, but the tablet blocks them from view. Similarly, I’d ideally like to “seal” the cross-sections of the corrugations on at least the front-facing edges; maybe a hot glue gun would work, there.
In case anybody wants to make one of their own, I’ll try to digitize the shapes for easy printing. It only took a few minutes to throw together, but it does the job with material I had on hand—I rarely lack corrugated cardboard, these days, and any cutting device would work—with the only difficult part involving “spearing” the sides at the right angle, so that assembly doesn’t bend the crossbars.
While I wouldn’t recommend playing it at this point, because I don’t have a key visual cue in place, I did complete Salavi’s basic game play. The generated games now function as a rudimentary single-player Snakes and Ladders game.
Notably, the boards now include a small number of—invisible at the moment—snakes and ladders. When the player lands on the start of one, the game automatically moves the game piece to the ending square.
Despite the invisible snakes and ladders, however, the game now treats the user to a visual cue of where to drop the token.
I also cleaned up the code, a bit.
If you need a walk-through on how the dragging-and-dropping works, I published a post explaining the code for Wednesday’s tech tip, so that I never need to look it up again and figure out the author’s weird assumptions.
This week, I want to figure out how to get an image—a snake or a ladder, say, but I’ll probably start with something like an arrow—to stretch from one arbitrary table cell to another. That, plus a formal winning condition, will complete the basic premise of Salavi. And then…the adversary.
Credits: The header image is Shield nickel obverse by Howard Spindel by Howard Spindel, made available under the terms of the Creative Commons Attribution Share-Alike 3.0 Unported license.
Tags: programming project devjournal