ajax for sending moves to server