added cloud function to update endGame status for teams based on value in GameConfiguration table