Skip to content

Instantly share code, notes, and snippets.

Created April 27, 2013 13:48
Show Gist options
  • Save anonymous/5473189 to your computer and use it in GitHub Desktop.
Save anonymous/5473189 to your computer and use it in GitHub Desktop.
package Roulette;
public class Bet {
public int amountBet;
public Outcome outcome;
public Bet(int amount, Outcome outcome){
this.outcome = outcome;
this.amountBet = amount;
}
public int winAmount(){
int winAmount = this.outcome.odds * this.amountBet;
return winAmount + this.amountBet;
}
public int loseAmount(){
int loseAmount = this.amountBet;
return loseAmount;
}
public String toString(){
return this.amountBet+" on "+"["+this.outcome.toString()+"]";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment