Today’s Javascript exercise was Factor Sensors which was about throwing, catching, and creating custom errors. Pretty good one.

It is the weekend so I got some more time to work on Minesweeper. I decided I needed to tackle the API at least in part. I do want to make a version not tied to an API that I can upload to itch.io before I call this done, but in the meantime I want the API to work.

With APIs involved, what should rear it’s ugly head, much as it does every time? CORS! The dreaded foul beast strikes again. I don’t even feel like I know how I fixed it. I just eventually added enough stuff in the right way to make it stop complaining. It probably only works on my dev machine.

After that I got the settings, and difficulty levels loading. I couldn’t figure out how to get the menu to have a checkmark like in the Python version. Instead I just marked it with bootstrap’s primary color. Good enough.

I eventually got it building the game board based on the settings instead of the hard-coded defaults. So the difficulty level menu and game\new game (mostly) works now.

I am noticing I am not flagging the game as done when there are no non-explosive squares left. I should fix that tomorrow.