Skip to content

Instantly share code, notes, and snippets.

@kumarsoumya
Created July 31, 2018 21:41
Show Gist options
  • Save kumarsoumya/a7d21a6d4b1820cc460f8834f5eaf97e to your computer and use it in GitHub Desktop.
Save kumarsoumya/a7d21a6d4b1820cc460f8834f5eaf97e to your computer and use it in GitHub Desktop.
package main
import "golang.org/x/tour/pic"
func Pic(dx, dy int) [][]uint8 {
board := make([][]uint8, dy);
for i := range board {
board[i] = make([]uint8, dx)
for j := range board[i] {
board[i][j] = uint8((i * j) / 2)
}
}
return board
}
func main() {
pic.Show(Pic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment