krampus19/soko/entitytype.go

24 lines
422 B
Go
Raw Permalink Normal View History

package soko
type EntityType byte
const (
EntityTypeInvalid EntityType = EntityType(0)
EntityTypeNone = '_'
EntityTypePlayer = '@'
EntityTypeTarget = 'X'
EntityTypeBrick = 'B'
)
func (e EntityType) IsValid() bool {
switch e {
case EntityTypeNone:
case EntityTypePlayer:
case EntityTypeTarget:
case EntityTypeBrick:
default:
return false
}
return true
}