Skip to content

Commit

Permalink
RPGame: Made slight change to getMerchantInventory method to allow for
Browse files Browse the repository at this point in the history
error detection in merchantNumber
  • Loading branch information
Gavin Li committed Feb 9, 2015
1 parent 9ad38e6 commit decf198
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MerchantRPGCSE2102/src/game/RPGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ public ArrayList<String> getMerchantInventory(int merchantNumber) {
return merchantInventory1;
else if (merchantNumber == 2)
return merchantInventory2;
else
else if (merchantNumber == 3)
return merchantInventory3;
else
{
System.out.println("Invalid merchant number");
return null;
}
}
}

0 comments on commit decf198

Please sign in to comment.