serenity/Userland/Games
Arda Cinar 5562ef6cc5 Minesweeper: Use a faster method to generate game field
The existing method was simply using a "randomly generate until it fits
our criteria" method to generate a game field. While this worked OK in
most cases, the run time was increasing seriously in boards whose
mine count / board size ratio was too big.

The new approach simply generates every possible mine location, shuffles
the array and picks its head. This uses more memory (shouldn't be a big
deal since minesweeper boards are generally miniscule) but runs much
quicker. The generation could still use some improvement (regarding
error handling), though :^)
2022-12-12 16:23:03 +00:00
..
2048 AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
BrickGame Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Chess Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
FlappyBug AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Flood AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
GameOfLife Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Hearts Meta+Userland: Pass Gfx::IntPoint by value 2022-12-07 11:48:27 +01:00
MasterWord MasterWord: Display the last word in a different color for short input 2022-12-11 22:10:37 +01:00
Minesweeper Minesweeper: Use a faster method to generate game field 2022-12-12 16:23:03 +00:00
Snake Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Solitaire AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Spider AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
CMakeLists.txt Games: Add BrickGame 2022-11-05 16:35:13 -06:00