From a7e6982eb9d9da866d62fd52dc7c1fd760105205 Mon Sep 17 00:00:00 2001 From: dmitry Date: Thu, 14 Dec 2017 22:52:41 +0300 Subject: [PATCH] - stay in facilities --- core/src/MyStrategy.java | 6 ++++++ core/src/Runner.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/MyStrategy.java b/core/src/MyStrategy.java index 2f15df1..6047577 100755 --- a/core/src/MyStrategy.java +++ b/core/src/MyStrategy.java @@ -168,6 +168,12 @@ private void potentialMove() { if (initialScale(myGroup)) continue; + if (myGroup.goToFacility != null && myGroup.getAveragePoint().getDistanceTo(myGroup.goToFacility.getCenterPos()) < 20) { + if (!myGroup.goToFacility.isMy() || myGroup.goToFacility.f.getCapturePoints() != game.getMaxFacilityCapturePoints()) { + log(Utils.LOG_MOVING + " skip move because of capturing " + myGroup); + continue; + } + } if (true) { scheduleSelectAll(myGroup); diff --git a/core/src/Runner.java b/core/src/Runner.java index f64ed3d..e058223 100755 --- a/core/src/Runner.java +++ b/core/src/Runner.java @@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException { //runProc(null, true, "java", "-cp", "22.jar", "Runner"); //runProc(null, true, "java", "-cp", "22.3.jar", "Runner"); //runProc(null, true, "java", "-cp", "22.5.jar", "Runner"); - runProc(null, true, "java", "-cp", "22.6.jar", "Runner"); + runProc(null, true, "java", "-cp", "23.jar", "Runner"); } }).start(); new Runner(new String[]{"127.0.0.1", hasArgs ? "31001" : "31002", "0000000000000000"}).run();