Курсовая работа: Java-гра Тетріс
score = 0;
level = 1;
fig = new Figure();
stakan = new Glass();
gameState = PLAY;
}
public void pauseGame() {
if (gameState == PLAY) {
gameState = PAUSE;
}
}
public void resumeGame() {
if (gameState == PAUSE) {
gameState = PLAY;
}
}
public void stopGame() {
gameState = STOP;
}
public int getState() {
return gameState;
}
public void figureMoveRight(){
if (fig.canRight(stakan)& gameState==PLAY)
fig.moveRight();
}
public void figureMoveLeft(){
if (fig.canLeft(stakan)& gameState==PLAY)
fig.moveLeft();