Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions contractGamblingGame
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ contract GamblingGame{
//Create a gambling game that takes a maximum of nubBets bets
function GamblingGame(uint8 _maxNumBets){
maxNumBets = _maxNumBets;
numBets = 0;
pot = 0;
}

function bet(uint8 numberBet){
Expand All @@ -15,11 +17,12 @@ contract GamblingGame{
//Map the bet and increase the number of bets
numbersMap[numBets]=numberBet;
userBet[numberBet]=sender;
isNumberBet[numberBet] = true;
numBets++;

//check if the number of bets has reached the limit
if(numBets==maxNumBets){
solveBets;
solveBets();
}


Expand Down Expand Up @@ -77,4 +80,3 @@ contract GamblingGame{
}