Documentation ¶
Index ¶
- Constants
- func Abs[T constraints.Integer](x T) T
- func Compare[C constraints.Ordered](a, b C) int
- func IsRightOrder(l PacketData, r PacketData) int
- func Min(elems ...int) int
- func Sort[V any](a []V, f func(V, V) int)
- func StringToInt(str string) int
- type Cavern
- type ClockCircuit
- type CpuInst
- type CrateMovement
- type Elf
- type File
- type Game
- type HeadMotion
- type Input1
- type Input10
- type Input11
- type Input12
- type Input13
- type Input14
- type Input2
- type Input3
- type Input4
- type Input5
- type Input6
- type Input7
- type Input8
- type Input9
- type Item
- type KeepAway
- type Monkey
- type PacketData
- type PacketInt
- type PacketList
- type Rope
- type Runner1
- type Runner10
- type Runner11
- type Runner12
- type Runner13
- type Runner14
- type Runner2
- type Runner3
- type Runner4
- type Runner5
- type Runner6
- type Runner7
- type Runner8
- type Runner9
- type SurroundingArea
Constants ¶
View Source
const ( NOOP int = iota ADDX )
View Source
const ( PACKET_INT = "PACKET_INT" PACKET_LIST = "PACKET_LIST" )
View Source
const ( AIR = iota C_ROCK SAND )
View Source
const ( ROCK = 1 PAPER = 2 SCISSORS = 3 VICTORY = 6 DRAW = 3 LOSE = 0 )
View Source
const ( RIGHT rune = 'R' LEFT rune = 'L' DOWN rune = 'D' UP rune = 'U' )
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[T constraints.Integer](x T) T
func Compare ¶
func Compare[C constraints.Ordered](a, b C) int
func IsRightOrder ¶
func IsRightOrder(l PacketData, r PacketData) int
func StringToInt ¶
Types ¶
type ClockCircuit ¶
type ClockCircuit struct { Cycle int // contains filtered or unexported fields }
func NewClockCircuit ¶
func NewClockCircuit() ClockCircuit
func (*ClockCircuit) AddInstruction ¶
func (c *ClockCircuit) AddInstruction(i CpuInst)
func (ClockCircuit) EmptyIntruction ¶
func (c ClockCircuit) EmptyIntruction() bool
func (ClockCircuit) PrintDisplay ¶
func (c ClockCircuit) PrintDisplay() string
func (ClockCircuit) SignalStrength ¶
func (c ClockCircuit) SignalStrength() int
func (ClockCircuit) String ¶
func (c ClockCircuit) String() string
func (*ClockCircuit) Tick ¶
func (c *ClockCircuit) Tick()
func (*ClockCircuit) WriteToDisplay ¶
func (c *ClockCircuit) WriteToDisplay()
type CrateMovement ¶
type CrateMovement struct {
// contains filtered or unexported fields
}
type HeadMotion ¶
type HeadMotion struct {
// contains filtered or unexported fields
}
type Input12 ¶
type Input12 SurroundingArea
type Input13 ¶
type Input13 []c.Pair[PacketData]
type Input9 ¶
type Input9 []HeadMotion
type KeepAway ¶
type KeepAway struct {
// contains filtered or unexported fields
}
func (KeepAway) MonkeyBusiness ¶
type PacketData ¶
func ParsePacketString ¶
func ParsePacketString(str string, i int) (PacketData, int)
type PacketList ¶
type PacketList struct {
Data []PacketData
}
func (PacketList) DataType ¶
func (p PacketList) DataType() string
func (PacketList) String ¶
func (p PacketList) String() string
type Rope ¶
type Rope struct {
// contains filtered or unexported fields
}
func (*Rope) MoveHead ¶
func (r *Rope) MoveHead(motion HeadMotion)
func (*Rope) RecordTail ¶
func (r *Rope) RecordTail()
type SurroundingArea ¶
type SurroundingArea struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.