jumpball

package
v0.0.0-...-544ef16 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanStop

func CanStop(path []bool, pos, speed int) bool

CanStop returns whether the jumping ball, starting at the first field of path, can eventually stop, starting off with speed. At each step the jumping ball can increase (+1), keep (0) or decrease (-1) its speed.

The jumping ball must never land on a field (element) with value false, which indicates a "spike" and the jumping ball would explode.

func CanStopWithMemo

func CanStopWithMemo(path []bool, pos, speed int, memo map[state]bool) bool

CanStopWithMemo is an optimised variant of the above

Types

This section is empty.

Jump to

Keyboard shortcuts

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