Skip to content

Commit 681e0ce

Browse files
committed
Change path to pathId in sample code - to prevent confusion about new references
1 parent 4217a19 commit 681e0ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Client/AI.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class AI {
1616
private int rows;
1717
private int cols;
1818
private Random random = new Random();
19-
private Path pathForMyUnits;
19+
private int pathIdForMyUnits;
2020

2121
public void pick(World world) {
2222
System.out.println("pick started");
@@ -39,7 +39,7 @@ public void pick(World world) {
3939
world.chooseHand(myDeck);
4040

4141
//other preprocess
42-
pathForMyUnits = world.getFriend().getPathsFromPlayer().get(0);
42+
pathIdForMyUnits = world.getFriend().getPathsFromPlayer().get(0).getId();
4343
}
4444

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

5757
// this code tries to cast the received spell

0 commit comments

Comments
 (0)