Skip to content

Commit

Permalink
Update NormalPlayer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
sthakulla authored Jun 7, 2018
1 parent e09c2e9 commit 7038ffc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions NormalPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,43 @@ public NormalPlayer(int initialMoney) {


}
@Override
public String printPlayer() {
String result = "";

if (count <= 0) {

int result1 = money - record;

System.out.println();

if (result1 > 0) {

System.out.println("---------Congratulations!---------" );

result = "Total money won" + " $" + (result1 - count * initalMoney);

} else if (result1 == 0) {

result = " did not win nor did lose..";

} else {

result1 *= -1;
System.out.println("---------Better Luck next time!!--------- ");

result = "Total money lost " + "$" + (result1 + count * initalMoney);

}

}

System.out.println(" Housemoney" + ": $" + Game.houseMoney);

System.out.println();

return result;
}



Expand Down

0 comments on commit 7038ffc

Please sign in to comment.