a

Dependencies:   Led-libary TextLCD mbed

Fork of Mbed-Mensch-8 by Projekte_werkstatt

Revision:
3:814d47b6991c
Parent:
2:3a90b20958ff
Child:
4:2acb70f9cd22
--- a/main.cpp	Fri Feb 05 09:17:21 2016 +0000
+++ b/main.cpp	Fri Feb 05 09:38:59 2016 +0000
@@ -529,7 +529,7 @@
         {
             if(PlayPos[(Drann<<2)|i]>Spieler-1) //Drausen
             {
-                if((PlayPos[(Drann<<2)|i]- Steine + Feldgrose * Drann+diceNum)<(Steine + Feldgrose *Spieler))//Zeil noch am Feld
+                if((PlayPos[(Drann<<2)|i]- Steine + Feldgrose * Drann+diceNum)<(Feldgrose *Spieler))//Zeil noch am Feld
                 {
                     char temp = Field[(PlayPos[(Drann<<2)|i]- Steine + Feldgrose * Drann+diceNum) % (Feldgrose*Steine)]; //zielfeld
                     if(temp>0)
@@ -545,7 +545,9 @@
                 }
                 else
                 {//Kollisionsberechnung ins Ziel...
-                    
+                    if(PlayPos[(Drann<<2)|i]+diceNum<(Steine*2 + Feldgrose*Spieler))//Schiest nicht über das Ziel hinaus...
+                        if(Ziel[PlayPos[(Drann<<2)|i]-Steine-Feldgrose*Spieler+diceNum]==0)//Zielfeld ist leer (enthält ja nur mich)
+                        moglich[i]=1;
                 }
             }
         }