Skip to content

Commit

Permalink
format smart contract
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyzhang1 committed Jan 9, 2022
1 parent 0699c04 commit c524fa4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions contracts/Betting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,12 @@ contract Betting {
/*check if there actually are any bets on this game, if there are no bets, just skip all of this and set game as "taken place"
without needing to take any action */
if (!(HomeAmount == 0 && AwayAmount == 0)) {

if (HomeAmount == 0){
if (HomeAmount == 0) {
_teamWinner = 2;
}
else if (AwayAmount == 0){
} else if (AwayAmount == 0) {
_teamWinner = 1;
}

// We loop through the player array to find the players that correctly bet on the winning team
for (uint256 i = 0; i < games[_gameID].players.length; i++) {
address payable playerAddress = games[_gameID].players[i];
Expand Down

0 comments on commit c524fa4

Please sign in to comment.