private void UpdateButton_Clicked(object sender, System.EventArgs e) { Updateing = true; size = (int)SizeSlider.Value; HamiltonianGenerator = new HamiltonianGenerator(size, size, true); ApplePoint = new Point((int)(size / 2), (int)(size / 2)); ToIncrease = 5; SnakeHead = new Point(0, 0); SnakePoints = new List <Point>(); Updateing = false; }
public SnakePage() { InitializeComponent(); BorderPaint = new SKPaint() { Style = SKPaintStyle.Stroke, Color = ((Color)Application.Current.Resources["TraceColor"]).ToSKColor() }; ApplePoint = new Point((int)(size / 2), (int)(size / 2)); HamiltonianGenerator = new HamiltonianGenerator(size, size, true); Surface = SKSurface.Create(new SKImageInfo(PixelSize, PixelSize)); ToIncrease = 5; SnakeHead = new Point(0, 0); SnakePoints = new List <Point>(); }