private void generateNextPiece() {
        int pieceType = random.nextInt(NUMBER_OF_PIECE_TYPES);

        Coord startLocation = new Coord(TANK_WIDTH / 2, 0);
        switch (pieceType) {
        case 0:
            currentPiece = new SquarePiece(startLocation);
            break;
        case 1:
            currentPiece = new LPiece(startLocation);
            break;
        case 2:
            currentPiece = new BackwardsLPiece(startLocation);
            break;
        case 3:
            currentPiece = new LinePiece(startLocation);
            break;
        case 4:
            currentPiece = new TPiece(startLocation);
            break;
        case 5:
            currentPiece = new ZPiece(startLocation);
            break;
        case 6:
            currentPiece = new SPiece(startLocation);
            break;
        default:
            throw new RuntimeException("Unknown pieceType: " + pieceType);
        }
    }