First logic of ghost movement