Skip to content

Instantly share code, notes, and snippets.

@phigasui
Last active October 21, 2017 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phigasui/17847a88da2a32f8352da3af21cc7189 to your computer and use it in GitHub Desktop.
Save phigasui/17847a88da2a32f8352da3af21cc7189 to your computer and use it in GitHub Desktop.
package main
import "golang.org/x/tour/pic"
func Pic(dx, dy int) [][]uint8 {
y := make([][]uint8, dy);
for i := range y {
y[i] = make([]uint8, dx);
for j := range y[i] {
y[i][j] = uint8((i ^ j))
}
}
return y
}
func main() {
pic.Show(Pic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment