krampus19/soko/locations.go
Sander Schobers 93be82bdbd Moved level state to soko package.
Renamed entity type character and egg to player and target respectively.
2020-01-15 21:25:32 +01:00

18 lines
314 B
Go

package soko
import "opslag.de/schobers/geom"
type Locations map[geom.Point]bool
func (l Locations) Add(p geom.Point) { l[p] = true }
func (l Locations) Clone() Locations {
clone := Locations{}
for p := range l {
clone[p] = true
}
return clone
}
func (l Locations) Remove(p geom.Point) { delete(l, p) }