[gnome-mines] Additional code cleanup
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines] Additional code cleanup
- Date: Sat, 13 Oct 2018 21:51:50 +0000 (UTC)
commit ae84ba5abbb98d043630d3059faf8817764b43fa
Author: Robert Roth <robert roth off gmail com>
Date: Sun Oct 14 00:51:36 2018 +0300
Additional code cleanup
src/minefield-view.vala | 1 -
src/minefield.vala | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index e0ea051..103ac58 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -207,7 +207,6 @@ public class MinefieldView : Gtk.Grid
_minefield.redraw_sector.connect (redraw_sector_cb);
_minefield.explode.connect (explode_cb);
- _minefield.paused_changed.connect (() => { queue_draw (); });
_minefield.cleared.connect (complete_cb);
_minefield.use_autoflag = use_autoflag;
queue_resize ();
diff --git a/src/minefield.vala b/src/minefield.vala
index ce0d379..2dfaaea 100644
--- a/src/minefield.vala
+++ b/src/minefield.vala
@@ -75,12 +75,11 @@ public class Minefield : Object
public uint n_cleared
{
get { return _n_cleared; }
- set { _n_cleared = value; }
}
public bool is_complete
{
- get { return n_cleared == width * height - n_mines; }
+ get { return _n_cleared == width * height - n_mines; }
}
public uint n_flags
@@ -264,7 +263,7 @@ public class Minefield : Object
return;
locations[x, y].cleared = true;
- n_cleared++;
+ _n_cleared++;
if (locations[x, y].flag == FlagType.FLAG)
n_flags--;
locations[x, y].flag = FlagType.NONE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]