From 5116aff8a45cf2df49a2856e19e165c4c5a08bf8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 23 Oct 2018 20:31:44 +0200 Subject: [PATCH] Refactor toggleCellState function --- lib/src/Simulation.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/Simulation.dart b/lib/src/Simulation.dart index ddd6086..f3efd39 100644 --- a/lib/src/Simulation.dart +++ b/lib/src/Simulation.dart @@ -73,7 +73,7 @@ class Simulation { } void toggleCellState(int x, int y) { - map.get(x, y) == false ? map.set(x, y, true) : map.set(x, y, false); + map.set(x, y, !map.get(x, y)); } Map update() {