the function 'onSoketkeyDown' is added to side server
the function 'calculateNewDirection' is added to side client