class Squash : Item { @CostumeAttribute var squashE = false @CostumeAttribute var squashN = false @CostumeAttribute var squashW = false @CostumeAttribute var squashS = false @CostumeAttribute var permanent = false override fun rounded( direction : int ) = permanent override fun squashable( direction : int ) : boolean { // Feather doesn't have a case statement yet :-( return if ( direction == EAST) { squashE } else if ( direction == NORTH ) { squashN } else if (direction == WEST ) { squashW } else if (direction == SOUTH ) { squashS } else { false } } override fun invaded( movement : Movement ) : boolean { if (!permanent && (! (movement.item is Bee)) ) { actor.die() } return true } }