diff --git a/Life/MainWindow.xaml b/Life/MainWindow.xaml
index 0352c0b..c306aba 100644
--- a/Life/MainWindow.xaml
+++ b/Life/MainWindow.xaml
@@ -30,12 +30,11 @@
-
+
Iteration
-
-
+
+
+
Size
diff --git a/Life/MainWindow.xaml.cs b/Life/MainWindow.xaml.cs
index b3ad5a3..0abbfe5 100644
--- a/Life/MainWindow.xaml.cs
+++ b/Life/MainWindow.xaml.cs
@@ -18,16 +18,13 @@ namespace Life
{
Automaton = new GameOfLife(20, 20),
Size = 16,
- Separation = 2
+ Separation = 2,
+ Steps = 1,
};
DataContext = ViewModel;
InitializeComponent();
}
-
- private void CommandBinding_OnExecuted(object sender, ExecutedRoutedEventArgs e)
- {
- }
}
}
\ No newline at end of file
diff --git a/Life/ViewModel/AutomatonViewModel.cs b/Life/ViewModel/AutomatonViewModel.cs
index cdfec2e..1657ef1 100644
--- a/Life/ViewModel/AutomatonViewModel.cs
+++ b/Life/ViewModel/AutomatonViewModel.cs
@@ -15,6 +15,7 @@ namespace Life.ViewModel
private int _separation;
private int _width;
private int _height;
+ private int _steps;
private IAutomaton _automaton;
private IFormatter _formatter = new BinaryFormatter();
@@ -81,6 +82,16 @@ namespace Life.ViewModel
}
}
+ public int Steps
+ {
+ get => _steps;
+ set
+ {
+ _steps = value;
+ OnPropertyChanged(nameof(Steps));
+ }
+ }
+
public IField Field => Automaton.Field;
public int Iteration => Automaton.Iteration;
@@ -104,14 +115,15 @@ namespace Life.ViewModel
Action = HandleSaveCommand
};
- public ICommand StepCommand => new DelegateCommand