robot

package
v0.0.0-...-c6f596e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitialState

func InitialState()

Types

type Command

type Command interface {
	// contains filtered or unexported methods
}

func ConvertLineToCommand

func ConvertLineToCommand(line string) Command

func ConvertLinesToCommands

func ConvertLinesToCommands(lines []string) []Command

type Direction

type Direction interface {
	String() string
	// contains filtered or unexported methods
}

type East

type East struct{}

func (East) String

func (East) String() string

type Left

type Left struct{}

type Move

type Move struct{}

type North

type North struct{}

func (North) String

func (North) String() string

type Place

type Place struct {
	X         int
	Y         int
	Direction Direction
}

type Report

type Report struct{}
type Right struct{}

type Robot

type Robot struct {
	X int
	Y int
	// contains filtered or unexported fields
}

func NewRobot

func NewRobot() Robot

func (Robot) IsOnTable

func (r Robot) IsOnTable() bool

func (Robot) Run

func (r Robot) Run(command Command) (Robot, *string)

type South

type South struct{}

func (South) String

func (South) String() string

type West

type West struct{}

func (West) String

func (West) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL