Ejemplo n.º 1
0
 private static void RedoRok(oyunMotoru motor)
 {
     Hamle = (string)Log.redoHamle.Peek();
     if (Hamle == "bRok")
     {
         Point sahYeri = motor.sahBul();
         motor.Rok(sahYeri.X, sahYeri.Y, "bRok");
     }
     else if (Hamle == "kRok")
     {
         Point sahYeri = motor.sahBul();
         motor.Rok(sahYeri.X, sahYeri.Y, "kRok");
     }
 }
Ejemplo n.º 2
0
 private static void UndoRok(oyunMotoru motor)
 {
     // Hamlede rok varsa kaleyi eski yerine getir...
     Hamle = (string)Log.undoHamle.Peek();
     if (Hamle == "bRok")
     {
         Point sahYeri = motor.sahBul();
         motor.satrancTaslari[sahYeri.X + 1, sahYeri.Y].Gizle(motor.g);
         motor.Tasi(sahYeri.X + 1, sahYeri.Y, sahYeri.X - 2, sahYeri.Y);
         motor.satrancTaslari[sahYeri.X - 2, sahYeri.Y].Goster(motor.g);
     }
     else if (Hamle == "kRok")
     {
         Point sahYeri = motor.sahBul();
         motor.satrancTaslari[sahYeri.X - 1, sahYeri.Y].Gizle(motor.g);
         motor.Tasi(sahYeri.X - 1, sahYeri.Y, sahYeri.X + 1, sahYeri.Y);
         motor.satrancTaslari[sahYeri.X + 1, sahYeri.Y].Goster(motor.g);
     }
 }
Ejemplo n.º 3
0
 private static void RedoRok(oyunMotoru motor)
 {
     Hamle = (string)Log.redoHamle.Peek();
     if (Hamle == "bRok")
     {
         Point sahYeri = motor.sahBul();
         motor.Rok(sahYeri.X, sahYeri.Y, "bRok");
     }
     else if (Hamle == "kRok")
     {
         Point sahYeri = motor.sahBul();
         motor.Rok(sahYeri.X, sahYeri.Y, "kRok");
     }
 }
Ejemplo n.º 4
0
 private static void UndoRok(oyunMotoru motor)
 {
     // Hamlede rok varsa kaleyi eski yerine getir...
     Hamle = (string)Log.undoHamle.Peek();
     if (Hamle == "bRok")
     {
         Point sahYeri = motor.sahBul();
         motor.satrancTaslari[sahYeri.X + 1, sahYeri.Y].Gizle(motor.g);
         motor.Tasi(sahYeri.X + 1, sahYeri.Y, sahYeri.X - 2, sahYeri.Y);
         motor.satrancTaslari[sahYeri.X - 2, sahYeri.Y].Goster(motor.g);
     }
     else if (Hamle == "kRok")
     {
         Point sahYeri = motor.sahBul();
         motor.satrancTaslari[sahYeri.X - 1, sahYeri.Y].Gizle(motor.g);
         motor.Tasi(sahYeri.X - 1, sahYeri.Y, sahYeri.X + 1, sahYeri.Y);
         motor.satrancTaslari[sahYeri.X + 1, sahYeri.Y].Goster(motor.g);
     }
 }