I was really liking this piece, but one inherent flaw of the example given is that I've already implemented minesweeper in javascript once a couple years ago for a programming challenge, so I'd have a major advantage over most candidates.
For example, I immediately recalled I solved the problem of mine placement with a 1 liner like:
For example, I immediately recalled I solved the problem of mine placement with a 1 liner like:
var cells = ('*'.repeat(mineCount) + ' '.repeat(size - mineCount)).split("").sort(function() { return math.rand() - .5; });