krampus19/soko/entitytype.go
Sander Schobers 93be82bdbd Moved level state to soko package.
Renamed entity type character and egg to player and target respectively.
2020-01-15 21:25:32 +01:00

24 lines
422 B
Go

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
}