Versions in this module Expand all Collapse all v0 v0.3.0 Oct 29, 2021 Changes in this version + type CmdType byte + const CmdBackward + const CmdForward + const CmdLeft + const CmdRight + type Instruction struct + Amount float64 + Cmd CmdType type Turtle + func (t *Turtle) DoInstruction(i Instruction) type TurtleDraw + func (td *TurtleDraw) DoInstruction(i Instruction) v0.2.1 Oct 29, 2021 v0.2.0 Oct 29, 2021 Changes in this version type Pen + func (p *Pen) PenToggle() type World + func NewWorldWithColor(width, height int, c color.Color) *World + func NewWorldWithImage(m *image.RGBA) *World + func (w *World) ResetImage() + func (w *World) ResetImageWithImage(m *image.RGBA) + func (w *World) ResetImageWithSize(width, height int) + func (w *World) ResetImageWithSizeColor(width, height int, c color.Color) v0.1.1 Aug 4, 2021 v0.1.0 Apr 6, 2021 Changes in this version + const East + const North + const South + const West + var Black = color.RGBA + var Blue = color.RGBA + var Cyan = color.RGBA + var DarkOrange = color.RGBA + var Green = color.RGBA + var Magenta = color.RGBA + var Red = color.RGBA + var SoftBlack = color.RGBA + var White = color.RGBA + var Yellow = color.RGBA + func Deg2rad(deg float64) float64 + func Rad2deg(rad float64) float64 + type Line struct + X0 float64 + X1 float64 + Y0 float64 + Y1 float64 + type Pen struct + Color color.Color + On bool + Size int + func NewPen() *Pen + func (p *Pen) PenDown() + func (p *Pen) PenUp() + func (p *Pen) SetColor(c color.Color) + func (p *Pen) SetSize(s int) + func (p *Pen) String() string + type Turtle struct + Deg float64 + X float64 + Y float64 + func New() *Turtle + func (t *Turtle) Backward(dist float64) + func (t *Turtle) Forward(dist float64) + func (t *Turtle) Left(deg float64) + func (t *Turtle) Right(deg float64) + func (t *Turtle) SetHeading(deg float64) + func (t *Turtle) SetPos(x, y float64) + func (t *Turtle) String() string + type TurtleDraw struct + W *World + func NewTurtleDraw(w *World) *TurtleDraw + func (td *TurtleDraw) Backward(dist float64) + func (td *TurtleDraw) Forward(dist float64) + func (td *TurtleDraw) SetPos(x, y float64) + func (td *TurtleDraw) String() string + type World struct + DrawLineCh chan Line + Height int + Image *image.RGBA + Width int + func NewWorld(width, height int) *World + func NewWorldImage(img *image.RGBA) *World + func (w *World) Close() + func (w *World) SaveImage(filePath string) error