private Rectangle getTetrominoBounds(char[][] tetromino) {
            Rectangle bounds = new Rectangle(-1, -1, -1, -1);
            boolean foundY = false;

            for (int r = 0; r < tetromino.length; r++) {
                boolean foundX = false;

                for (int c = 0; c < tetromino[0].length; c++) {
                    if (Character.isLetter(tetromino[r][c])) {
                        foundY = true;
                        foundX = true;

                        if (bounds.x == -1 || c < bounds.x)
                            bounds.x = c;

                        if ((c + 1) > bounds.width)
                            bounds.width = c + 1;
                    }
                }

                if (!foundY)
                    bounds.y = r;

                if (foundX && r > bounds.height)
                    bounds.height = r;
            }

            bounds.height -= bounds.y;
            bounds.width -= bounds.x;

            return bounds;
        }