package main import ( "fmt" ) var cell string = "x" var x int var y int func main() { matrix := [][]string{ {cell, cell, cell}, {cell, "1", cell}, {cell, cell, cell}, } for i := 0; i < len(matrix); i++ { for _, v := range matrix[i] { fmt.Printf("%v ", v) } fmt.Println() } fmt.Printf("Where's the one?\n") fmt.Printf("X coordinate: ") fmt.Scanln(&x) fmt.Printf("Y coordinate: ") fmt.Scanln(&y) x-- y-- if matrix[x][y] == "1" { fmt.Println("You win!") } else { fmt.Println("You lose!") } }