3 ms·
What does the function do if the entire board is mines?
by throwawayk7h 2y ago
What does the function do if the entire board is mines?
- jraph 2y agoAn array out of bounds access.
- dutzi 2y agoIt BSODs!
- berkes 2y agoFound the tester :) Jokes aside, I love it how in a group of software engineers someone can always think of an even more unlikely, but somehow realistic edge case. For me, one of the marks of a senior engineer would be to then either go "we'll just not allow the board to be filled with entirely mines in the builder", or "well, if that ever happens: just let it crash". A practical solution to a theoretical case. Whereas the more junior engineer would spend the next few days researching and refactoring the algorithm to address this case. Obv. "it depends", letting my insuline pump "just crash" isn't cool, but minesweeper, meh.
- j5155 2y agoSee https://www.youtube.com/watch?v=0-REcpPz3vw https://www.youtube.com/watch?v=0-REcpPz3vw It causes some strange bugs to occur!