Hi,
Despite the fact I had to manually write the whole GamePieceFactory method (where the task said at level 12 that it will complete it by its own), I don't know why it does not validate now.
Can you help?
Thanks
package com.codegym.task.task22.task2213;
public class Tetris {
private Field field;
private GamePiece gamePiece;
public static Tetris game;
public Field getField() {
return field;
}
public GamePiece getGamePiece() {
return gamePiece;
}
public void run() {
}
public void step() {
gamePiece.down();
if(!gamePiece.isCurrentPositionAvailable()) {
gamePiece.up();
gamePiece.land();
field.removeFullLines();
gamePiece = GamePieceFactory.createRandomGamePiece(field.getWidth() / 2, 0);
}
}
public static void main(String[] args) {
game = new Tetris();
game.run();
}
}