A tiny Design By Numbers clone written in Go.
Generate PNG adn GIF from .dbn
files.
// gradient.dbn
Repeat A 0 100 {
Pen A
Set Y (100 - A)
Line 0 Y 100 Y
}
$ dbngo -i gradient.dbn -p gradient.png -g gradient.gif -s 2
- Paper
- Pen
- Line
- Set
- Set (Dot)
- Set (Copy)
- Repeat
- Same/Notsame
- Smaller/Notsmaller
- Command
- Load
- Number
MouseForeverKeyNetTime- Array
- Letters
Command | DBN | dbngo |
---|---|---|
Load | Load lib.dbn |
Load "lib.dbn" |
amoebicbandedclock- calculate
- commands
dancinguydancingy- dots
grainsofraingraymachineheadsortailsintersecting- line
loopingmeebermergingnervousguy- nesting1
- nesting2
painting- paper
parameciumplaidprobingquantitative- questions
raininglinesreactive- repeating
- rocket2
rockettimethehunttime1time2tuftball- variable
- mitpress/*
$ go install golang.org/x/tools/cmd/goyacc@latest
$ goyacc -o parser/parser.go parser/parser.go.y
$ go fmt ./...
$ go test $(go list ./... | grep -v /wasm) -coverprofile=cover_broken.out && \
cat cover_broken.out | grep -v yaccpar | grep -v .y > cover.out && \
go tool cover -html=cover.out -o coverage.html
$ go run main.go -i testdata/hello.dbn -p tmp/dbngo.png -g tmp/dbngo.gif -s 2