From 08a2a7eb23c54a6ecef740444ebfa6038592800f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A4iv=C3=B6=20Jimi=20Sebastian?= <jiminaivo@gmail.com>
Date: Thu, 14 Nov 2024 09:27:31 +0200
Subject: [PATCH] =?UTF-8?q?pallot=20lis=C3=A4tty=20hahmojen=20paikoiksi=20?=
 =?UTF-8?q?valikkoon?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../SimulaattoriPeli/SimulaattoriPeli.cs         | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs b/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs
index 22108e7..cb9d67f 100644
--- a/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs
+++ b/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs
@@ -23,7 +23,7 @@ public class SimulaattoriPeli : PhysicsGame
     private GameObject Areena; //luo areenan alueen
     private GameObject Hahmot; //luo hahmojen valinta alueen
     private GameObject Ohjeet; //luo ohjeet
-    private GameObject HahmotPaikka;
+
     
     public override void Begin()
     {
@@ -55,10 +55,16 @@ public class SimulaattoriPeli : PhysicsGame
         Hahmot.Position = new Vector(-750, 0); //Hahmojen alueen sijainti
         Add(Hahmot); //lisää hahmojen alueen    
 
-        HahmotPaikka = new GameObject(150, 150, Shape.Circle); //Luo hahmojen paikat
-        HahmotPaikka.Color = Color.White; //Hahmojen paikka väri
-        HahmotPaikka.Position = new Vector(-750, 300);
-        Add(HahmotPaikka);
+        for (int jakso = 0; jakso < 2; jakso++)
+        {
+            for (int rivi = 0; rivi < 4; rivi++)
+            {
+                GameObject HahmotPaikka = new GameObject(150, 150, Shape.Circle); //Luo hahmojen paikat
+                HahmotPaikka.Color = Color.White; //Hahmojen paikka väri
+                HahmotPaikka.Position = new Vector(-850 + jakso * 200, 300 - rivi * 220);
+                Add(HahmotPaikka); 
+            }
+        }
         
         Label hahmotOtsikko = new Label("Characters"); //teksti hahmojen alueelle
         hahmotOtsikko.TextColor = Color.Black; // tekstin väri
-- 
GitLab