add ajax for gameplay