Added if-else function to recordData to flag when game is over
If-else statements changed to if statements before and after recordData, keeping in line with the logic of recording game info to server and updating screen
Moved end of game actions into endGame function, deleted else-if statement from #grow code. All endGame actions triggered by endGame function.
Added end_results dialog to function endGame, including population of empty spans in dialog message
Deleted extra curly brace after bootstrap, deleted commented-out dialogs below
Updated totalRandomPoints and totalOptimalPoints to include game object