Skip to content

Commit

Permalink
Change path to pathId in sample code - to prevent confusion about new…
Browse files Browse the repository at this point in the history
… references
  • Loading branch information
taslimisina committed Mar 4, 2020
1 parent 4217a19 commit 681e0ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Client/AI.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class AI {
private int rows;
private int cols;
private Random random = new Random();
private Path pathForMyUnits;
private int pathIdForMyUnits;

public void pick(World world) {
System.out.println("pick started");
Expand All @@ -39,7 +39,7 @@ public void pick(World world) {
world.chooseHand(myDeck);

//other preprocess
pathForMyUnits = world.getFriend().getPathsFromPlayer().get(0);
pathIdForMyUnits = world.getFriend().getPathsFromPlayer().get(0).getId();
}

public void turn(World world) {
Expand All @@ -51,7 +51,7 @@ public void turn(World world) {
// play all of hand once your ap reaches maximum. if ap runs out, putUnit doesn't do anything
if (myself.getAp() == maxAp) {
for (BaseUnit baseUnit : myself.getHand())
world.putUnit(baseUnit, pathForMyUnits);
world.putUnit(baseUnit, pathIdForMyUnits);
}

// this code tries to cast the received spell
Expand Down

0 comments on commit 681e0ce

Please sign in to comment.