justify">};
}
{. Sleep (speed);
} while (MainWindow.Shape_.down ());
space = false; (mode)
{1:
Score + = 12;; 2:
Score + = 15;; 3:
Score + = 18;;
}. MF.setScoreShape (Score, Shapes);
LineRem (); (int i = 0; i <4; i + +)
{(Shape.y (i) == 0)
{. MF.EndGame ();;
}
}
}
} LineRem ()
{f = true; y = 0; (y = 18; y! = 0; y -)
{
f = true; (int x = 0; x <10; x + +)
{(MainWindow.table [x, y]! = true)
f = false;
} (f == true)
{(int y_ = y; y_! = 0; y_ -)
{(int x_ = 0; x_ <10; x_ + +)
{. table [x_, y_] = MainWindow.table [x_, (y_ - 1)];
}
}
y + +;
LinesRemoved + +;
Score + = 100;. MF.setRemovLines (LinesRemoved);. MF.setScoreShape (Score, Shapes);
}
}
} ClearTable ()
{(int i = 0; i <10; i + +) (int j = 0; j <19; j + +). table [i, j] = false;. Inv ();
}
}
}
КлассShot - відповідає за кулю випущену з конкретного танка в грі В«Гоник (танки)В».
using
{
{time; x = 0,
y = 0; tank; Shot (Tank t, int t_ = 250)
{
tank = t;
time = t_;
x = tank.coord [0, 0];
y = tank.coord [0, 1];
} go ()
{(tank.state)
{1: y -; break; 2: x -; break; 3: y + +; break; 4: x + +; break;
} (! checkCoords ()); temp = tank.state; (true)
{
remove (); (temp)
{1:
y -; (! checkCoords ());; 2:
x -; (! checkCoords ());; 3:
y + +; (! checkCoords ());; 4:
x + +;;
} (! checkCoords ());
toTable ();. Inv ();. Sleep (time);
}
} toTable ()
{. table [x, y] = true;
} remove ()
{. table [x, y] = false;
}