Skip to content

Commit

Permalink
Update SuperVIPPlayer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
sthakulla authored Jun 7, 2018
1 parent 992e0ef commit e09c2e9
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion SuperVIPPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class SuperVIPPlayer extends VIPPlayer{
public SuperVIPPlayer(String playerName, int initialMoney, String idNumber) {

super(playerName, initialMoney, idNumber);

super.playerType=2;
}

public int superVipCashBack() {
Expand All @@ -28,5 +28,37 @@ else if(betCount > 20) {
public void addBet() {
betCount++;
}
@Override
public String printPlayer() {
String result = "";

if (count <= 0) {

int result1 = money - record;
System.out.println();
if (result1 > 0) {

System.out.println("---------Congratulations!---------:" +name+"\tPlayer ID:"+idNumber);;
result = "Total money won" + " $" + (result1 - count * initalMoney);//need to work on it after no 3 of gameMenu
} else if (result1 == 0) {
result = " did not win nor did lose.."; }
else {

result1 *= -1;

System.out.println("---------Better Luck next time!!--------- :"+name+"\tPlayer ID:"+idNumber);

result = "Total money lost by " + name + " is $" + (result1 + count * initalMoney);
}

}
System.out.println(" Housemoney because of " + name + ":$" + Game.houseMoney);

System.out.println();

return result;

// method toString
}

}

0 comments on commit e09c2e9

Please sign in to comment.