public void Tick() { var oldCoordinate = Ant.Coordinate; Colors color = Ant.Move(this); _matrix[oldCoordinate.X, oldCoordinate.Y] = color; }
#pragma warning disable IDE1006 // Naming Styles // Timer tick function private void tmrMoveTimer_Tick(object sender, EventArgs e) { // If ant movement fails, stop the animation if (langton.Move() == false) { mnuMainMenuFileStop.PerformClick(); langton.ResetAntPos(); return; } // Otherwise, update counter MoveCount++; txtStep.Text = MoveCount.ToString(); }