class Car : Movable{ @CostumeAttribute var direction = 0 override fun myTurn() { val south = lookSouth() if (south.squashable( SOUTH ) ) { moveSouth() } else { val next = look( direction ) if (next.squashable( direction)) { move(direction) } } } override fun canPush( direction : int, speed : int, strength : int ) : boolean { if (strength < 2) return false if (isMoving()) return false if ( direction == EAST || direction == WEST ) return false val next = look( direction ) if ( next.squashable( direction ) ) { return true } return next.canPush( direction, speed, strength - 4 ) } override fun moved( movement : Movement ) { val next = look(movement.direction).item() if (next.isPlayer()) { next.item().kill() } else if (next is Explodes && !next.isMoving()) { (next as Explodes).explode() actor.die() } super.moved( movement ) } override fun copyable() = true }