Comment

Comment by alexandercrohde

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:

var cells = ('*'.repeat(mineCount) + ' '.repeat(size - mineCount)).split("").sort(function() { return math.rand() - .5; });

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton