player move calculation logic