From 681e0ce74e353c65bb689a827f9d8373eda5203d Mon Sep 17 00:00:00 2001 From: taslimisina Date: Wed, 4 Mar 2020 15:14:38 +0330 Subject: [PATCH] Change path to pathId in sample code - to prevent confusion about new references --- src/Client/AI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Client/AI.java b/src/Client/AI.java index 84f0767..d396448 100644 --- a/src/Client/AI.java +++ b/src/Client/AI.java @@ -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"); @@ -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) { @@ -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