예제 #1
0
 private void makeTransaction(Game game, int payment) {
   Player source = game.getCurrentPlayer();
   Player target = game.getOwner((PropertyLand) getCurrentLand(game));
   if (!source.equals(target)) {
     source.decreaseBalance(payment);
     target.increaseBalance(payment);
     JOptionPane.showMessageDialog(
         null, source.getName() + " paid " + payment + "K to " + target.getName());
   }
 }