fix: bouncing ball row->column in loop
This commit is contained in:
		| @@ -24,8 +24,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// draw a smiley | 	// draw a smiley | ||||||
|   | |||||||
| @@ -24,8 +24,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// create a drawing buffer | 	// create a drawing buffer | ||||||
|   | |||||||
| @@ -35,8 +35,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// create a drawing buffer | 	// create a drawing buffer | ||||||
|   | |||||||
| @@ -118,8 +118,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// create a drawing buffer | 	// create a drawing buffer | ||||||
|   | |||||||
| @@ -53,8 +53,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// create a drawing buffer | 	// create a drawing buffer | ||||||
|   | |||||||
| @@ -68,8 +68,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// create a drawing buffer | 	// create a drawing buffer | ||||||
|   | |||||||
| @@ -46,8 +46,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// create a drawing buffer | 	// create a drawing buffer | ||||||
|   | |||||||
| @@ -66,8 +66,8 @@ func main() { | |||||||
|  |  | ||||||
| 	// create the board | 	// create the board | ||||||
| 	board := make([][]bool, width) | 	board := make([][]bool, width) | ||||||
| 	for row := range board { | 	for column := range board { | ||||||
| 		board[row] = make([]bool, height) | 		board[column] = make([]bool, height) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// create a drawing buffer | 	// create a drawing buffer | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user