Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.34 KB | None | 0 0
  1. package main
  2.  
  3. import "golang.org/x/tour/pic"
  4.  
  5. func Pic(dx, dy int) [][]uint8 {
  6.     board := [][]uint8{}
  7.     for y := 0; y < dy; y++ {
  8.         board = append(board, []uint8{})
  9.         for x := 0; x < dy; x++ {
  10.             board[y] = append(board[y], uint8(x+y))
  11.         }
  12.     }
  13.     return board
  14. }
  15.  
  16. func main() {
  17.     pic.Show(Pic)
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement