Position newPos = move(s.hero.position, d);
return new State(s, d, new HeroState(s.hero.life + deltaHp(newPos, s.hero.life), deltaGold(newPos), deltaMines(newPos), newPos));
}
private static Position move(Position pos, Direction d) {
return new Position(pos.x + d.dx, pos.y + d.dy);
}