diff --git a/Game1/Sources/Crops/Crops.cs b/Game1/Sources/Crops/Crops.cs index 74a0b01..b738bb0 100644 --- a/Game1/Sources/Crops/Crops.cs +++ b/Game1/Sources/Crops/Crops.cs @@ -273,6 +273,7 @@ class Crops } ProductionRate = ProductionRate / 1.5f; } + ProductionRate = (float)Math.Pow(ProductionRate, 2.5f); return ProductionRate; } diff --git a/Game1/Sources/ML/MLModel.cs b/Game1/Sources/ML/MLModel.cs index 7a1870a..a6aebe2 100644 --- a/Game1/Sources/ML/MLModel.cs +++ b/Game1/Sources/ML/MLModel.cs @@ -11,12 +11,12 @@ using Microsoft.ML.Trainers.LightGbm; class MLModel { private static MLContext mlContext = new MLContext(seed: 1); - private static string path = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/Fertilizer_Prediction.csv"; - private static string modelpath = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/MLmodel"; - private static string report = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/report"; - private static string pathBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/BigFertPredict.csv"; - private static string modelpathBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/MLmodelBig"; - private static string reportBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/report_BigModel"; + private static string path = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/Fertilizer_Prediction.csv"; + private static string modelpath = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/MLmodel"; + private static string report = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/report"; + private static string pathBig = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/BigFertPredict.csv"; + private static string modelpathBig = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/MLmodelBig"; + private static string reportBig = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/report_BigModel"; // Loading data, creatin and saving ML model for smaller dataset (100) public static void CreateModel() diff --git a/Game1/Sources/Objects/Tractor.cs b/Game1/Sources/Objects/Tractor.cs index f56278d..d071f44 100644 --- a/Game1/Sources/Objects/Tractor.cs +++ b/Game1/Sources/Objects/Tractor.cs @@ -9,7 +9,9 @@ class Tractor private Path path = new Path(); private SmartTractor smartTractor = new SmartTractor(); private HandleRotation handleRotation = new HandleRotation(); - private int j = 60; + private int WaitFrame = 30; + private int j; + public void updateSizing(Input input, int Status, Vector2 newHousePos, DayNightCycle Time) @@ -63,10 +65,29 @@ class Tractor public void updatePosition(Vector2 Size, int Status) // updates the position { + //farm.updateSize(Size, sizeTile, Spacing); for (int i = 0; i < Speed; i++) { + updateDirection(Size, Position); + + + /* + if (!smartTractor.getWaitTwoFrames()) + { + updateDirection(Size, Position); + j = WaitFrame; + } + else if (j != 0) + { + j--; + } + else + { + smartTractor.setWaitTwoFrames(false); + }*/ + } }