From a378d7278aa2caa8c636510adec1e8b15c4636ae Mon Sep 17 00:00:00 2001 From: Lulu Date: Thu, 15 May 2014 12:32:20 +0000 Subject: [PATCH] V1.1 - ScrabbleBrett nun mit Wort- und Buchstaben-Multiplikatoren --- ...schaftsspiel-Replikator%2FScrabbleBrett.mw | 75 +++++++++++++------ 1 file changed, 54 insertions(+), 21 deletions(-) diff --git a/Gesellschaftsspiel-Replikator%2FScrabbleBrett.mw b/Gesellschaftsspiel-Replikator%2FScrabbleBrett.mw index e9f00dfda..07666ae46 100644 --- a/Gesellschaftsspiel-Replikator%2FScrabbleBrett.mw +++ b/Gesellschaftsspiel-Replikator%2FScrabbleBrett.mw @@ -1,7 +1,8 @@
 
+
 // Scrabble Spielbrett
-// 2014-05-15 V1
+// 2014-05-15 V1.1
 // by Stratum 0
 // License: WTFPL
 
@@ -23,35 +24,33 @@ for (i = [1:Viertelfeld])
           translate([(Kante+Abstand)*i+Abstand,(Kante+Abstand)*j,0])  
            { 
             //Dreifacher Wortwert
-            if ((i==1) && (j==1)) {   Feld("red");   }
-            if ((i==1) && (j==8)) {   Feld("red");   }
-            if ((i==8) && (j==1)) {   Feld("red");   }
+            if ((i==1) && (j==1)) {   Feld("red");   Striche(3);}
+            if ((i==1) && (j==8)) {   Feld("red");   Striche(3);}
+            if ((i==8) && (j==1)) {   Feld("red");   Striche(3);}
             
             //Doppelter Wortwert
-            if ((i==2) && (j==2)) {   Feld("pink");   }
-            if ((i==3) && (j==3)) {   Feld("pink");   }
-            if ((i==4) && (j==4)) {   Feld("pink");   }
-            if ((i==5) && (j==5)) {   Feld("pink");   }
-            if ((i==8) && (j==8)) {   Feld("pink");   }
+            if ((i==2) && (j==2)) {   Feld("pink");   Striche(2);}
+            if ((i==3) && (j==3)) {   Feld("pink");   Striche(2);}
+            if ((i==4) && (j==4)) {   Feld("pink");   Striche(2);}
+            if ((i==5) && (j==5)) {   Feld("pink");   Striche(2);}
+            if ((i==8) && (j==8)) {   Feld("pink");   Striche(2);}
 
             // Dreifacher Buchstabenwert
-            if ((i==2) && (j==6)) {   Feld("blue");   }
-            if ((i==6) && (j==2)) {   Feld("blue");   }
-            if ((i==6) && (j==6)) {   Feld("blue");   }
+            if ((i==2) && (j==6)) {   Feld("blue");   Punkte(3);}
+            if ((i==6) && (j==2)) {   Feld("blue");   Punkte(3);}
+            if ((i==6) && (j==6)) {   Feld("blue");   Punkte(3);}
 
             // Doppelter Buchstabenwert
-            if ((i==7) && (j==7)) {   Feld("lightblue");   }
-            if ((i==3) && (j==7)) {   Feld("lightblue");   }
-            if ((i==7) && (j==3)) {   Feld("lightblue");   }
-            if ((i==8) && (j==4)) {   Feld("lightblue");   }
-            if ((i==4) && (j==8)) {   Feld("lightblue");   }
-            if ((i==1) && (j==4)) {   Feld("lightblue");   }
-            if ((i==4) && (j==1)) {   Feld("lightblue");   }
+            if ((i==7) && (j==7)) {   Feld("lightblue");   Punkte(2); }
+            if ((i==3) && (j==7)) {   Feld("lightblue");   Punkte(2);}
+            if ((i==7) && (j==3)) {   Feld("lightblue");   Punkte(2);}
+            if ((i==8) && (j==4)) {   Feld("lightblue");   Punkte(2);}
+            if ((i==4) && (j==8)) {   Feld("lightblue");   Punkte(2);}
+            if ((i==1) && (j==4)) {   Feld("lightblue");   Punkte(2);}
+            if ((i==4) && (j==1)) {   Feld("lightblue");   Punkte(2);}
 
             // ansonsten normales Feld
             Feld("lightgreen");
-            
-        
          }
           } // End For J
      } // End For I
@@ -74,5 +73,39 @@ module Feld(Farbe)
    
 }
 
+module Punkte(AnzahlPunkte)
+{
+    if (AnzahlPunkte==2)
+    {
+        translate ([Kante/3, Kante/3, Hoehe]) cylinder(Randhoehe/2,2,1);
+        translate ([Kante/3*2, Kante/3*2, Hoehe]) cylinder(Randhoehe/2,2,1); 
+    }
+    if (AnzahlPunkte==3)
+    {
+        translate ([Kante/4, Kante/4, Hoehe]) cylinder(Randhoehe/2,2,1);
+        translate ([Kante/4*2, Kante/4*2, Hoehe]) cylinder(Randhoehe/2,2,1); 
+        translate ([Kante/4*3, Kante/4*3, Hoehe]) cylinder(Randhoehe/2,2,1); 
+    }
+}
+
+
+
+module Striche(AnzahlStriche)
+{
+  if (AnzahlStriche==2)
+    {
+        translate ([Kante/3, Kante/4, Hoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]);
+        translate ([Kante/3*2, Kante/4, Hoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]); 
+    }
+    if (AnzahlStriche==3)
+    {
+        translate ([Kante/4, Kante/4, Hoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]);
+        translate ([Kante/4*2, Kante/4, Hoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]); 
+        translate ([Kante/4*3, Kante/4, Hoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]); 
+    }
+}
+
+
+
 
 
-- 2.20.1