krampus19/soko/entitytype.go

24 lines
432 B
Go

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