Skip to content

Commit

Permalink
Merchant Class update:
Browse files Browse the repository at this point in the history
*Updated the decrementCash method to decreaseCash to better fit its use
  • Loading branch information
Gavin Li committed Feb 10, 2015
1 parent 6b60f82 commit aecf52b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MerchantRPGCSE2102/src/game/Merchant.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void incrementCash(int incrementAmount)
}

//removes the specified amount from the merchant's current cash
public int decrementCash(int decrementAmount)
public int decreaseCash(int decrementAmount)
{
//checks if the amount attempting to be removed is
//greater than the current amount
Expand Down
4 changes: 2 additions & 2 deletions MerchantRPGCSE2102/src/tests/TestMerchant.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public void setup()
public void testCashSystem() throws Exception
{
setup();
assertEquals(-1, m.decrementCash(101));
assertEquals(-1, m.decreaseCash(101));
m.incrementCash(100);
m.refreshCash();
assertEquals(200, m.getCurrentCash());
m.decrementCash(120);
m.decreaseCash(120);
assertEquals(80, m.getCurrentCash());
}

Expand Down

0 comments on commit aecf52b

Please sign in to comment.