2020-01-15 18:06:06 +00:00
|
|
|
package soko
|
|
|
|
|
|
|
|
type EntityType byte
|
|
|
|
|
|
|
|
const (
|
2020-01-15 20:25:32 +00:00
|
|
|
EntityTypeInvalid EntityType = EntityType(0)
|
|
|
|
EntityTypeNone = '_'
|
|
|
|
EntityTypePlayer = '@'
|
|
|
|
EntityTypeTarget = 'X'
|
|
|
|
EntityTypeBrick = 'B'
|
2020-01-15 18:06:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (e EntityType) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case EntityTypeNone:
|
2020-01-15 20:25:32 +00:00
|
|
|
case EntityTypePlayer:
|
|
|
|
case EntityTypeTarget:
|
2020-01-15 18:06:06 +00:00
|
|
|
case EntityTypeBrick:
|
|
|
|
default:
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
}
|