public void MineFromGoldMine(GoldMine goldMine) { this.goldMine = goldMine; Node curNode = graph.GetNode(position); foreach (Edge edge in curNode.Neighbors) { if (edge.GetNeighbor(curNode) == goldMine.GetNode) { peonState = PeonState.Mining; return; } } MoveToLocation(new Vector2(goldMine.GetNode.Position.X * Game1.WINDOW_WIDTH / (Game1.WINDOW_WIDTH / Game1.graphSize), goldMine.GetNode.Position.Y * Game1.WINDOW_HEIGHT / (Game1.WINDOW_HEIGHT / Game1.graphSize))); }