From 37bff59f83f7a4e08254ff9ec34e565df4dff7ff Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 19 Oct 2018 20:01:52 +0200 Subject: [PATCH] Remove clear function: Code Duplication --- lib/components/controls_component.dart | 2 +- lib/service/simulation_service.dart | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/components/controls_component.dart b/lib/components/controls_component.dart index 3f31741..1d7ee17 100644 --- a/lib/components/controls_component.dart +++ b/lib/components/controls_component.dart @@ -39,6 +39,6 @@ class ControlsComponent { } void onClearClicked() { - sim.clear(); + sim.reset(); } } diff --git a/lib/service/simulation_service.dart b/lib/service/simulation_service.dart index 396290b..5f538ec 100644 --- a/lib/service/simulation_service.dart +++ b/lib/service/simulation_service.dart @@ -24,10 +24,6 @@ class SimulationService { _sim.addRandomPattern(); } - void clear() { - _sim.reset(); - } - Point get gridSize => _sim.gridSize; void set gridSize(Point size) { _sim.gridSize = size;