Added logic to compute game results.