From 90c543e7090fa3114dcf6f19e139559ca7fb849f Mon Sep 17 00:00:00 2001
From: josisaku <josisaku@jyu.fi>
Date: Tue, 18 Mar 2025 02:09:50 +0200
Subject: [PATCH] ruletti betsystem changes

---
 .../Financial_Freedom/Financial_Freedom.cs    | 29 ++++++++++---------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/Financial_Freedom/Financial_Freedom/Financial_Freedom.cs b/Financial_Freedom/Financial_Freedom/Financial_Freedom.cs
index fc92524..d4f56db 100644
--- a/Financial_Freedom/Financial_Freedom/Financial_Freedom.cs
+++ b/Financial_Freedom/Financial_Freedom/Financial_Freedom.cs
@@ -1392,7 +1392,9 @@ public class  Financial_Freedom : PhysicsGame
         
         // Asetetaan gridin aloituskohta panostusalueen sisällä niin, että se on keskitetty
         double startX = panostusAlue.Position.X - gridWidth / 2 + buttonSize / 2;
-        double startY = panostusAlue.Position.Y + panostusAlue.Height / 2 - gridHeight / 2 - buttonSize / 2;
+        double startY = (panostusAlue.Position.Y + panostusAlue.Height / 2 - gridHeight / 2 - buttonSize / 2)-50;
+        
+        //Console.WriteLine($"start x ={startX} ja start y = {startY}");
         
         for (int i = 0; i < totalButtons; i++)
         {
@@ -1458,13 +1460,13 @@ public class  Financial_Freedom : PhysicsGame
         GameObject gOPanos = new GameObject(150, 50);
         gOPanos.Color = Color.LimeGreen;
         // Asetetaan nappi hieman panostusalueen alapuolelle
-        gOPanos.Position = new Vector(-80, 140);
+        gOPanos.Position = new Vector(startX+52, startY+55);
         Add(gOPanos);
         
         Label gOLabel = new Label(150, 50);
         gOLabel.Text = "0";
         gOLabel.TextColor = Color.White;
-        gOLabel.Position = new Vector(-80, 140);
+        gOLabel.Position = new Vector(startX+52, startY+55);
         gOPanos.Add(gOLabel);
         
         Mouse.Listen(MouseButton.Left, ButtonState.Pressed, () =>
@@ -1484,13 +1486,13 @@ public class  Financial_Freedom : PhysicsGame
         GameObject gO0Panos = new GameObject(150, 50);
         gO0Panos.Color = Color.LimeGreen;
         // Asetetaan nappi hieman panostusalueen alapuolelle
-        gO0Panos.Position = new Vector(80, 140);
+        gO0Panos.Position = new Vector(startX+220, startY+55);
         Add(gO0Panos);
         
         Label gO0Label = new Label(150, 50);
         gO0Label.Text = "00";
         gO0Label.TextColor = Color.White;
-        gO0Label.Position = new Vector(80, 140);
+        gO0Label.Position = new Vector(startX+220, startY+55);
         gO0Panos.Add(gO0Label);
         
         Mouse.Listen(MouseButton.Left, ButtonState.Pressed, () =>
@@ -1510,13 +1512,13 @@ public class  Financial_Freedom : PhysicsGame
         GameObject punainenPanos = new GameObject(165, 60);
         punainenPanos.Color = Color.Red;
         // Asetetaan nappi hieman panostusalueen alapuolelle
-        punainenPanos.Position = new Vector(-85, 205);
+        punainenPanos.Position = new Vector(startX+52, startY+125);
         Add(punainenPanos);
         
         Label punainenLabel = new Label(165, 60);
         punainenLabel.Text = "Punainen";
         punainenLabel.TextColor = Color.White;
-        punainenLabel.Position = new Vector(-85, 205);
+        punainenLabel.Position = new Vector(startX+52, startY+125);
         punainenPanos.Add(punainenLabel);
         
         Mouse.Listen(MouseButton.Left, ButtonState.Pressed, () =>
@@ -1536,13 +1538,13 @@ public class  Financial_Freedom : PhysicsGame
         GameObject mustaPanos = new GameObject(165, 60);
         mustaPanos.Color = Color.Black;
         // Asetetaan nappi hieman panostusalueen alapuolelle
-        mustaPanos.Position = new Vector(85, 205);
+        mustaPanos.Position = new Vector(startX+220, startY+125);
         Add(mustaPanos);
         
         Label mustaLabel = new Label(165, 60);
         mustaLabel.Text = "Musta";
         mustaLabel.TextColor = Color.White;
-        mustaLabel.Position = new Vector(85, 205);
+        mustaLabel.Position = new Vector(startX+220, startY+125);
         mustaPanos.Add(mustaLabel);
         
         Mouse.Listen(MouseButton.Left, ButtonState.Pressed, () =>
@@ -1567,20 +1569,19 @@ public class  Financial_Freedom : PhysicsGame
         GameObject Done = new GameObject(150, 75);
         Done.Color = Color.Green;
         // Asetetaan nappi hieman panostusalueen alapuolelle
-        Done.Position = new Vector(350, -200);
+        Done.Position = new Vector(Screen.Right-200,-200);
         Add(Done);
         
         Label DoneLabel = new Label(150, 75);
         DoneLabel.Text = "Valmis";
         DoneLabel.TextColor = Color.White;
-        DoneLabel.Position = new Vector(350, -200);
+        DoneLabel.Position = new Vector(Screen.Right-200,-200);
         Done.Add(DoneLabel);
         
         Mouse.Listen(MouseButton.Left, ButtonState.Pressed, () =>
         {
             if (Done.IsInside(Mouse.PositionOnScreen))
             {
-                MessageDisplay.Add($"Panokset on jaettu kohtiin: {clickLog}");
                 RulettiPyöritys();
             }
         }, "Aseta panos värille Musta");
@@ -1605,8 +1606,8 @@ public class  Financial_Freedom : PhysicsGame
     {
         ClearGameObjects();
         ClearControls();
-        int tulos;
-        MessageDisplay.Add($"Panokset on jaettu kohtiin: {clickLog}");
+        List<string> Betit = new HashSet<string>(clickLog).ToList();
+        MessageDisplay.Add($"Panokset on jaettu kohtiin:{string.Join(", ", Betit)}");
         RulettiAnimaatio();
         TakaisinPV();
     }
-- 
GitLab