day_11_v2

package
v0.0.0-...-0235693 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(n int64) func(x int64) int64

func MultBy

func MultBy(n int64) func(x int64) int64

func Part1

func Part1()

func Part2

func Part2()

func Square

func Square(x int64) int64

func TestDivBy

func TestDivBy(n int64) func(x int64) bool

Types

type InputMonkey

type InputMonkey struct {
	Items          []int
	Operation      func(int64) int64
	TestDivBy      int
	ThrowToIfTrue  int
	ThrowToIfFalse int
}

type Item

type Item struct {
	ID       string
	Value    int64
	AtMonkey int
	History  []int
}

type Monkey

type Monkey struct {
	ID             int
	Items          []*Item
	Operation      func(int64) int64
	Test           func(int64) bool
	TestDivBy      int
	ThrowToIfTrue  int
	ThrowToIfFalse int
	Activity       int
}

func (Monkey) ItemIDs

func (m Monkey) ItemIDs() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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