Skip to content

Commit

Permalink
Update VIPPlayer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
sthakulla authored Jun 7, 2018
1 parent c4a24c2 commit 992e0ef
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions VIPPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,38 @@ public int vipCashBack() {
return (int) Math.round(cashBackDouble); // convert to int and return

}
@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
}



Expand Down

0 comments on commit 992e0ef

Please sign in to comment.