Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
  1. Your game is missing the fun of minesweeper: a timer and the ability to flag mines!
  2. Also, it will be nice if you had at least a reset button, if not a button to change the number of mines. :)
  3. Oh yeah, your expansion logic doesn't seem to expand to also include the numbered cells... It only expands the empty ones, leaving the user to have to manually click on the surrounding numbered cells. This diminishes the playing quality somewhat.
  4. Following from the earlier section, your Dimensions(20, 20) can be a bit small for high-DPI displays, it will be nice if you either went with higher values, or look for non-pixel-based scaling alternatives... Here's a related StackOverflow link Here's a related StackOverflow link I found that may be of interest:
  1. Your game is missing the fun of minesweeper: a timer and the ability to flag mines!
  2. Also, it will be nice if you had at least a reset button, if not a button to change the number of mines. :)
  3. Oh yeah, your expansion logic doesn't seem to expand to also include the numbered cells... It only expands the empty ones, leaving the user to have to manually click on the surrounding numbered cells. This diminishes the playing quality somewhat.
  4. Following from the earlier section, your Dimensions(20, 20) can be a bit small for high-DPI displays, it will be nice if you either went with higher values, or look for non-pixel-based scaling alternatives... Here's a related StackOverflow link I found that may be of interest:
  1. Your game is missing the fun of minesweeper: a timer and the ability to flag mines!
  2. Also, it will be nice if you had at least a reset button, if not a button to change the number of mines. :)
  3. Oh yeah, your expansion logic doesn't seem to expand to also include the numbered cells... It only expands the empty ones, leaving the user to have to manually click on the surrounding numbered cells. This diminishes the playing quality somewhat.
  4. Following from the earlier section, your Dimensions(20, 20) can be a bit small for high-DPI displays, it will be nice if you either went with higher values, or look for non-pixel-based scaling alternatives... Here's a related StackOverflow link I found that may be of interest:
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

As pointed out by @Simon @Simon, it'll be better have methods that directly represents the exact actions we want on a Cell, i.e. to setMine(), or check isMine(), or the more straightforward isChecked() as opposed to isNotChecked(). Here they are...

Again, @Simon @Simon has some good pointers about your generateMinesLocation() method, but I think it can be further improved... by removing it entirely. Why?

As pointed out by @Simon, it'll be better have methods that directly represents the exact actions we want on a Cell, i.e. to setMine(), or check isMine(), or the more straightforward isChecked() as opposed to isNotChecked(). Here they are...

Again, @Simon has some good pointers about your generateMinesLocation() method, but I think it can be further improved... by removing it entirely. Why?

As pointed out by @Simon, it'll be better have methods that directly represents the exact actions we want on a Cell, i.e. to setMine(), or check isMine(), or the more straightforward isChecked() as opposed to isNotChecked(). Here they are...

Again, @Simon has some good pointers about your generateMinesLocation() method, but I think it can be further improved... by removing it entirely. Why?

added 91 characters in body
Source Link
h.j.k.
  • 19.4k
  • 3
  • 37
  • 93

Just in case you forgot, init() does the plantMines() and setCellValues() for us.

Just in case you forgot, init() does the plantMines() and setCellValues() for us.

added 9934 characters in body
Source Link
h.j.k.
  • 19.4k
  • 3
  • 37
  • 93
Loading
Source Link
h.j.k.
  • 19.4k
  • 3
  • 37
  • 93
Loading
lang-java

AltStyle によって変換されたページ (->オリジナル) /