Change static method isWalkable in OOP function