18 lines
314 B
Go
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) }
|