logic

package
v2.0.0-rc-2016+incompa... Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2016 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRecognizingObject = errors.New("cannot recognize object")

Functions

func Clash

func Clash(first Living, second Object, dot *playground.Dot) error

Clash implements logic of clash of two objects (first and second) in dot dot

Types

type Food

type Food interface {
	Object
	NutritionalValue(*playground.Dot) int8 // Nutritional value
}

Object game characteristics

type Living

type Living interface {
	Object
	Resistant
	Die()      // Every living thing ever dies
	Feed(int8) // Living things are hungry
}

Object game characteristics

type Notalive

type Notalive interface {
	Object
	Break(*playground.Dot)
}

Object game characteristics

type Object

type Object interface{}

Object game characteristics

type Resistant

type Resistant interface {
	Object
	Strength() float32
}

Object game characteristics

Jump to

Keyboard shortcuts

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