This repository was archived by the owner on Apr 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm3.vb
More file actions
72 lines (59 loc) · 2.36 KB
/
Copy pathForm3.vb
File metadata and controls
72 lines (59 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Public Class Form3
Private Sub ApplySDebug_Click(sender As Object, e As EventArgs) Handles ApplySDebug.Click
If SDebugSnakeSpeed.Text <> "" Then
Form1.snakeSpeed = SDebugSnakeSpeed.Text
End If
If SDebugXpos.Text <> "" Then
Form1.xPos = SDebugXpos.Text
End If
If SDebugYpos.Text <> "" Then
Form1.yPos = SDebugYpos.Text
End If
If SDebugYmznValue.Text <> "" And SDebugXmznValue.Text <> "" And SDebugMznIndex.Text <> "" Then
If SDebugYmznValue.Text > Form1.gridY Then
SDebugYmznValue.Text = Form1.gridY
End If
If SDebugXmznValue.Text > Form1.gridX Then
SDebugYmznValue.Text = Form1.gridX
End If
Form1.yMzn(SDebugMznIndex.Text) = SDebugYmznValue.Text
Try
Form1.manzana(SDebugMznIndex.Text).Location = New Point(Form1.yMzn(SDebugMznIndex.Text), Form1.xMzn(SDebugMznIndex.Text))
Catch ex As Exception
End Try
End If
If SDebugMaznComida.SelectedItem <> "" Then
Form1.manzComida = SDebugMaznComida.SelectedItem
End If
If SDebugMaznComida.SelectedItem <> "" Then
Form1.manzComida = SDebugMaznComida.SelectedItem
End If
If SDebugComenzo.SelectedItem <> "" Then
Form1.comenzo = SDebugComenzo.SelectedItem
End If
If SDebugMaznComida.SelectedItem <> "" Then
Form1.manzComida = SDebugMaznComida.SelectedItem
End If
If SDebugPuntos.Text <> "" Then
Form1.puntos = SDebugPuntos.Text
SnakeBodyFix()
End If
Form1.UpdateInfo(True)
End Sub
''' <summary>
''' Esto es un bug muy especifico de aqui asi que no se si usare esta solucion en alguna otra parte
''' del codigo, si se me ocurre alguna mecanica rara de perder puntos en donde nesesite esto, lo
''' movere al form principal.
''' </summary>
Sub SnakeBodyFix()
Dim Adding As Integer = 1
Do
If Form1.snakeBody(Form1.puntos + Adding).Location <> Form1.startingPicPoint Then
Form1.snakeBody(Form1.puntos + Adding).Location = Form1.startingPicPoint
Adding += 1
Else
Adding = 0
End If
Loop Until Adding = 0
End Sub
End Class