Coder's Block

Will Boyd's Portfolio

Dec 13

Align 4 Game

The classic game, played against an AI opponent. Applies the minimax algorithm to pick its moves. Coded as a multi-threaded app using a web worker. Web workers require code to be executed from separate JavaScript files. The code here is the UI thread. If you want to see the web worker code, check out Align 4 Game (Web Worker). Higher difficulty levels are computationally expensive, so the computer's turn may take a while, especially on mobile devices. Blog post: Align 4 Retrospective: Writing a Multi-Threaded Game in JavaScript
Dec 11

Via Twitter Web Client

Got ChromeVox enabled while listening to trance music. Imagining I'm in an accessible rave with robots singing along poorly.
Nov 16

Crazy Meta CSS Hack

There are several HTML tags that aren’t rendered on a page. Tags like <head>, <meta>, <script> — all very important, but browsers don’t display them. The interesting thing is, browsers can display them, they’re just told not to by the user agent stylesheet: So what happens when you override the CSS that hides them? Crazy...
Nov 6

Fun Times with CSS Counters

CSS counters are one of those “oh neat, didn’t know CSS could do that” features with a lot of interesting potential. In simple terms, they let you keep a running tally of things in CSS — no JavaScript needed. Basic Counter Here’s an easy pagination example to get us started: See the Pen Pagination CSS...