private void OnMouseDown(object sender, MouseEventArgs e) { restart = World.Running; World.Running = false; painting = true; LastPainted = ViewPort.GetCellAt(e.Location); World.Toggle(LastPainted); World.Update(); }
private void OnMouseMove(object sender, MouseEventArgs e) { if (painting) { var lp = ViewPort.GetCellAt(e.Location); if (lp != LastPainted) { LastPainted = ViewPort.GetCellAt(e.Location); World.Toggle(LastPainted); World.Update(); } } }