public function valid()
    {
        if ($this->getWalkFlag() & self::WALK_X) {
            return $this->validX();
        } elseif ($this->getWalkFlag() & self::WALK_Y) {
            return $this->validY();
        } else {
            return $this->validXY();
        }
    }