Skip to content

Commit

Permalink
Merge pull request #114 from ezraroi/102-bug-in-simulate-game-on-clie…
Browse files Browse the repository at this point in the history
…nt-side

fixed
  • Loading branch information
ezraroi authored Sep 13, 2024
2 parents 1089b58 + 1c31963 commit 3c84026
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions Mundialito/Client/src/Games/GameCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const
$log.debug('GameCtrl: simulating game');
$scope.simulateGamePromise = GamesManager.simulateGame($scope.game.GameId, $scope.simulatedGame).then((data) => {
$scope.users = data;
$scope.users.forEach((user) => {
if (user.GeneralBet !== null) {
user.GeneralBet.WinningTeam = $scope.teamsDic[user.GeneralBet.WinningTeamId].Name;
user.GeneralBet.GoldenBootPlayer = MundialitoUtils.shortName($scope.playersDic[user.GeneralBet.GoldenBootPlayerId].Name);
}
});
Alert.success('Table updated with simulation result');
}).catch((err) => {
Alert.error('Failed to simulate game, please try again');
Expand Down
2 changes: 1 addition & 1 deletion Mundialito/wwwroot/js/app-min.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions Mundialito/wwwroot/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -984,12 +984,6 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const
$log.debug('GameCtrl: simulating game');
$scope.simulateGamePromise = GamesManager.simulateGame($scope.game.GameId, $scope.simulatedGame).then((data) => {
$scope.users = data;
$scope.users.forEach((user) => {
if (user.GeneralBet !== null) {
user.GeneralBet.WinningTeam = $scope.teamsDic[user.GeneralBet.WinningTeamId].Name;
user.GeneralBet.GoldenBootPlayer = MundialitoUtils.shortName($scope.playersDic[user.GeneralBet.GoldenBootPlayerId].Name);
}
});
Alert.success('Table updated with simulation result');
}).catch((err) => {
Alert.error('Failed to simulate game, please try again');
Expand Down

0 comments on commit 3c84026

Please sign in to comment.