about summary refs log tree commit diff
path: root/structs
diff options
context:
space:
mode:
Diffstat (limited to 'structs')
-rw-r--r--structs/structs.go51
1 files changed, 51 insertions, 0 deletions
diff --git a/structs/structs.go b/structs/structs.go
new file mode 100644
index 0000000..b4ce0e6
--- /dev/null
+++ b/structs/structs.go
@@ -0,0 +1,51 @@
+package structs
+
+import "fmt"
+
+type Lab struct {
+	Arr [5][5]int
+}
+
+type Coord struct {
+	X, Y	int
+}
+
+func (lab *Lab) Foward(pos Coord) *Lab {
+	lab.Arr[pos.X][pos.Y] = 0
+	lab.Arr[pos.X][pos.Y + 1] = 1
+
+	fmt.Println(pos.X)
+	fmt.Println(pos.Y + 1)
+
+	return lab
+}
+
+func (lab *Lab) Backwards(pos Coord) *Lab {
+	lab.Arr[pos.X][pos.Y] = 0
+	lab.Arr[pos.X][pos.Y + 1] = 1
+
+	fmt.Println(pos.X)
+	fmt.Println(pos.Y + 1)
+
+	return lab
+}
+
+func (lab *Lab) Left(pos Coord) *Lab {
+	lab.Arr[pos.X][pos.Y] = 0
+	lab.Arr[pos.X][pos.Y + 1] = 1
+
+	fmt.Println(pos.X)
+	fmt.Println(pos.Y + 1)
+
+	return lab
+}
+
+func (lab *Lab) Right(pos Coord) *Lab {
+	lab.Arr[pos.X][pos.Y] = 0
+	lab.Arr[pos.X+1][pos.Y] = 1
+
+	fmt.Println(pos.X)
+	fmt.Println(pos.Y + 1)
+
+	return lab
+}