From b516b6be6f7a7a691c89431bda39f5e1c700f415 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Mon, 15 Jun 2020 23:11:17 +0930 Subject: change error cases --- MainWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'MainWindow.cpp') 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; } -- cgit v1.2.3