diff --git a/Game1/Content/Rainfall.png b/Game1/Content/Rainfall.png new file mode 100644 index 0000000..961c75a Binary files /dev/null and b/Game1/Content/Rainfall.png differ diff --git a/Game1/Game1.cs b/Game1/Game1.cs index eb32a4b..8faeaf4 100644 --- a/Game1/Game1.cs +++ b/Game1/Game1.cs @@ -326,7 +326,7 @@ namespace Game1 { for (int j = -1; j < input.getSize().Y + 1; j++) { - spriteBatch.Draw(Rain, tractorUnit.getFarm().getRainPosition(input.getTileSize(), i, j), new Rectangle(0, cloudSprite * 96, input.getTileSize(), input.getTileSize()), Color.White); + spriteBatch.Draw(Rain, tractorUnit.getFarm().getRainPosition(input.getTileSize(), i, j), new Rectangle(0, cloudSprite * 96, input.getTileSize(), input.getTileSize()), tractorUnit.getFarm().getRainAmount(i, j)); } } } diff --git a/Game1/Sources/Crops/Farm.cs b/Game1/Sources/Crops/Farm.cs index 271c70c..3ba357f 100644 --- a/Game1/Sources/Crops/Farm.cs +++ b/Game1/Sources/Crops/Farm.cs @@ -76,7 +76,7 @@ class Farm RainPosition.Y = r.Next(0, 1950); WindSpeed.X = r.Next(-1, 1); WindSpeed.Y = r.Next(-1, 1); - RainfallMap = PerlinNoise.LoadImage("C:\\Users\\Joel\\source\\repos\\Oskars Repo\\Game1\\Content\\Rainfall.bmp"); + RainfallMap = PerlinNoise.LoadImage("C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/Rainfall.png"); } public Rectangle getRainPosition(int TileSize, int x, int y) diff --git a/Game1/Sources/ML/MLModel.cs b/Game1/Sources/ML/MLModel.cs index 1b44fed..0c9ef5a 100644 --- a/Game1/Sources/ML/MLModel.cs +++ b/Game1/Sources/ML/MLModel.cs @@ -11,13 +11,20 @@ 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() {