Skip to content

Commit

Permalink
Removing transaction check for MapUI
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed Apr 11, 2015
1 parent 01a8d5a commit 92e353c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions MerchantRPGCSE2102/src/view/MapUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ public void paint(Graphics g) {
g2d.drawString("x: " + player.getX() + " y : " + player.getY(), 10, 20);
g2d.drawString("delta X: " + player.getChangeInX() +" delta Y: " + player.getChangeInY(), 10, 50);
g2d.drawString("Vertex: (" + map.getPlayer().getRow() + ", " + map.getPlayer().getCol() + ")", 1000, 20);

if (transactionAvailable) {
g2d.setFont(new Font("Verdana", Font.BOLD, 18));
g2d.drawString("Would you like to trade with merchant?", 800, 60);
}

}

/**
Expand Down Expand Up @@ -133,13 +129,6 @@ public void move() {
map.movePlayer("south");
player.setChangeInY(1);
}

// Checking if a Merchant is nearby
if (map.collisionTo("north")||map.collisionTo("south")||map.collisionTo("east")||map.collisionTo("west")||map.collisionTo("southeast")||map.collisionTo("southwest")||map.collisionTo("northeast")||map.collisionTo("northwest")) {
transactionAvailable = true;
} else {
transactionAvailable = false;
}
}

/**
Expand Down

0 comments on commit 92e353c

Please sign in to comment.