You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
379 B
Go
24 lines
379 B
Go
package sim
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/jordanorelli/astro-domu/internal/math"
|
|
)
|
|
|
|
type entity struct {
|
|
ID int `json:"id"`
|
|
Position math.Vec `json:"pos"`
|
|
Glyph rune `json:"glyph"`
|
|
behavior
|
|
}
|
|
|
|
type behavior interface {
|
|
// update is the standard tick function
|
|
update(time.Duration)
|
|
}
|
|
|
|
type doNothing struct{}
|
|
|
|
func (d doNothing) update(time.Duration) {}
|