Live data from Hacker News

Show HN: An Event Sourced Minesweeper

dfarr.github.io

21–26 of 26 posts

Re: Show HN: An Event Sourced Minesweeper

#22
post #20

I was playing a quick game, clicked a mine and it was impossible for it to be a mine based on the numbers. I was about to screenshot and post it here when I realized that I had scrolled to perfectly hide the bottom row of the game, which changed everything. There's another HN post right now about a UI problem costing Citibank $500M. It seems like this is somewhat related in my mind. If the application had made clear…

The perils of hiding the scrollbar by default (and also using a fixed:bottom element). I feel the modern push for clean design sometimes goes too far - removing the scrollbar definitely being one of those instances.

Re: Show HN: An Event Sourced Minesweeper

#24
post #21

Awesome! Love the look and the blog post. But a feature request: a timer!

I imagine there are a variety of ways to implement a timer where you can go back in time...

That's definitely the crux of the problem! Although it would be cool to see the clock go backwards when you drag the slider, it's probably more accurate to keep the clock counting up so it reflects the overall time it takes to complete the game.

Re: Show HN: An Event Sourced Minesweeper

#25
post #13

I may have found a little bug. Sometimes when you win the last mines don't get a flag: https://imgur.com/a/xLcNZ0X . My last move was to right-click on the 2 in the bottom left. Also, right clicking on borders sometimes pops up a context menu.

That's no bug, flags are strictly placed by the player.

One of the fun side games I've been playing is to try to beat the game with the fewest possible events, which means not flagging squares - it's definitely much harder!

Re: Show HN: An Event Sourced Minesweeper

#26
Oh, it's in Elm. Cool! I'll definitely read the code later today and hopefully learn something. Did writing this reveal any interesting pros/cons regarding event sourcing in contrast to a stateful implementation?

Minesweeper is such a cool exercise when learning new stuff. A co-worker challenged me to write this crude implementation on a flight from Heathrow to NYC while I was learning Go: https://gitlab.com/joyey/kakkamiina

Post reply on HN