diff --git a/Game1/Sources/Smart/AI.cs b/Game1/Sources/Smart/AI.cs index 91753ff..02b7ebb 100644 --- a/Game1/Sources/Smart/AI.cs +++ b/Game1/Sources/Smart/AI.cs @@ -24,15 +24,6 @@ class AI public void init() { inventory.initInventorySystem(); - inventory.addItem(1, 1); - inventory.addItem(1, 1); - inventory.addItem(3, 1); - inventory.addItem(5, 1); - inventory.addItem(7, 1); - inventory.addItem(7, 1); - inventory.addItem(10, 1); - inventory.addItem(10, 1); - inventory.useItem(10, 1); } @@ -97,6 +88,11 @@ class AI if (farm.getCrop((int)tractorPos.X, (int)tractorPos.Y).getCropTimer() == 1) { farm.setCropStatus(tractorPos.X, tractorPos.Y); + if (farm.getCrop((int)tractorPos.X, (int)tractorPos.Y).getStatus() == 2) + { + inventory.addItem(farm.getCrop((int)tractorPos.X, (int)tractorPos.Y).getCropType() - 1, 1); + } + } return farm; }