From 904d41949da21753bf74c6c3f5e021fac0bfee0b Mon Sep 17 00:00:00 2001 From: Jerry Mao Date: Mon, 3 Jan 2022 18:03:11 -0500 Subject: [PATCH] Fix bug in mining --- engine/src/main/battlecode/world/RobotControllerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/main/battlecode/world/RobotControllerImpl.java b/engine/src/main/battlecode/world/RobotControllerImpl.java index 32e52a3f..5cb869b2 100644 --- a/engine/src/main/battlecode/world/RobotControllerImpl.java +++ b/engine/src/main/battlecode/world/RobotControllerImpl.java @@ -609,7 +609,7 @@ public void mineLead(MapLocation loc) throws GameActionException { this.gameWorld.setLead(loc, this.gameWorld.getLead(loc) - 1); this.gameWorld.getTeamInfo().addLead(getTeam(), 1); this.gameWorld.getMatchMaker().addAction(getID(), Action.MINE_LEAD, locationToInt(loc)); - this.gameWorld.getMatchMaker().addLeadDrop(robot.getLocation(), -1); + this.gameWorld.getMatchMaker().addLeadDrop(loc, -1); } private void assertCanMineGold(MapLocation loc) throws GameActionException { @@ -639,7 +639,7 @@ public void mineGold(MapLocation loc) throws GameActionException { this.gameWorld.setGold(loc, this.gameWorld.getGold(loc) - 1); this.gameWorld.getTeamInfo().addGold(getTeam(), 1); this.gameWorld.getMatchMaker().addAction(getID(), Action.MINE_GOLD, locationToInt(loc)); - this.gameWorld.getMatchMaker().addGoldDrop(robot.getLocation(), -1); + this.gameWorld.getMatchMaker().addGoldDrop(loc, -1); } // *************************