diff options
author | Daniel Jones <admin@danieljon.es> | 2020-06-15 23:11:17 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-06-15 23:11:17 +0930 |
commit | b516b6be6f7a7a691c89431bda39f5e1c700f415 (patch) | |
tree | 297f886465185cc305f65533369798f3e0c32751 | |
parent | 931f12cf9846fbd8cd2c4ae09c55aa359687b7b3 (diff) | |
download | foxminesweeper-b516b6be6f7a7a691c89431bda39f5e1c700f415.tar.gz foxminesweeper-b516b6be6f7a7a691c89431bda39f5e1c700f415.zip |
change error cases
-rw-r--r-- | MainWindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MainWindow.cpp b/MainWindow.cpp index 59845bd..1c0cc27 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -333,15 +333,15 @@ MainWindow::on_New_Click(FXObject *sender, FXSelector sel, void *data) { /* all fields need values */ app->beep(); - FXMessageBox::information(app, FX::MBOX_OK, "Invalid game options", "All fields need integer values"); + FXMessageBox::information(app, FX::MBOX_OK, "Invalid game options", "All fields need positive (non-zero) integer values"); return 1; } - if (m > (w*h)) + if (m >= (w*h)) { - /* cannot have more mines that tiles */ + /* cannot have >= mines that tiles */ app->beep(); - FXMessageBox::information(app, FX::MBOX_OK, "Invalid game options", "You cannot have more mines that tiles (mines > (width*height))"); + FXMessageBox::information(app, FX::MBOX_OK, "Invalid game options", "You cannot have the same or more mines than tiles (mines >= (width*height))"); return 1; } |