github.com/korsakjakub/snk@v0.0.0-20230625212658-1d6c119c67ee/actor.go (about) 1 package main 2 3 type actor struct { 4 s shape 5 r rune 6 } 7 8 func (s shape) contains(c coord) bool { 9 for _, e := range s { 10 if e.x == c.x && e.y == c.y { 11 return true 12 } 13 } 14 return false 15 }