This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"strings" | |
) | |
func LookupFlag(name string) (value string, found bool) { | |
i := 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/csv" | |
"flag" | |
"fmt" | |
"io" | |
"os" | |
"path/filepath" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/csv" | |
"fmt" | |
"os" | |
"strconv" | |
) | |
type Record struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package render | |
func Recolor(cMap[color.Color]color.Color) Modification { | |
return func(rgba image.Image) *image.RGBA { | |
bds := rgba.Bounds() | |
newRgba := image.NewRGBA(bds) | |
for x := 0; x < bds.Max.X; x++ { | |
for y :=0; y < bds.Max.Y; y++ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func GetHoles(sh Shape, w, h int) [][]intgeom.Point { | |
flooding := make(map[intgeom.Point]bool) | |
for x := 0; x < w; x++ { | |
for y := 0; y < h; y++ { | |
if !sh.At(x, y) { | |
flooding[intgeom.Point{x,y}] = true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// This is a gist copy of https://github.com/200sc/collision-demo/blob/master/core.go | |
import ( | |
"image/color" | |
"bitbucket.org/oakmoundstudio/oak" | |
"bitbucket.org/oakmoundstudio/oak/collision" | |
"bitbucket.org/oakmoundstudio/oak/entities" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bitbucket.org/oakmoundstudio/plasticpiston/plastic" | |
"bitbucket.org/oakmoundstudio/plasticpiston/plastic/collision" | |
"bitbucket.org/oakmoundstudio/plasticpiston/plastic/entities" | |
"bitbucket.org/oakmoundstudio/plasticpiston/plastic/event" | |
"bitbucket.org/oakmoundstudio/plasticpiston/plastic/render" | |
"image/color" | |
"math/rand" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"image/color" | |
"time" | |
"github.com/200sc/go-dist/floatrange" | |
"bitbucket.org/oakmoundstudio/oak" | |
"bitbucket.org/oakmoundstudio/oak/collision" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All public gists https://gist.github.com/200sc | |
Copyright 2017, Patrick Stephen | |
MIT License, http://www.opensource.org/licenses/mit-license.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// Build cross-compiles packages on set of | |
// OS and architecture pairs. | |
import ( | |
"bytes" | |
"flag" | |
"fmt" | |
"os" |
NewerOlder