@@ -0,0 +1,1483 @@
+import javax.swing.*;%0Aimport java.awt.event.MouseAdapter;%0Aimport java.awt.event.MouseEvent;%0A%0Apublic class Tile extends JButton %7B%0A  private final Board board;%0A  private final int x;%0A  private final int y;%0A  private final boolean isMine;%0A  private boolean isRevealed;%0A  private Flag flag;%0A  private int number;%0A%0A  public Tile(Board board, int x, int y, boolean isMine) %7B%0A    this.board = board;%0A    this.x = x;%0A    this.y = y;%0A    this.isMine = isMine;%0A    this.isRevealed = false;%0A    this.flag = Flag.EMPTY;%0A    this.number = 0;%0A%0A    this.addMouseListener(new MouseAdapter() %7B%0A      @Override%0A      public void mouseReleased(MouseEvent mouseEvent) %7B%0A        if (SwingUtilities.isRightMouseButton(mouseEvent) && !isRevealed) %7B%0A          switch (flag) %7B%0A            case EMPTY: %7B%0A              flag = Flag.FLAGGED;%0A              break;%0A            %7D%0A            case FLAGGED: %7B%0A              flag = Flag.QUESTION_FLAGGED;%0A              break;%0A            %7D%0A            case QUESTION_FLAGGED: %7B%0A              flag = Flag.EMPTY;%0A              // fall-through%0A            %7D%0A            default:%0A          %7D%0A        %7D else if (!isRevealed) %7B%0A          reveal();%0A        %7D%0A      %7D%0A    %7D);%0A  %7D%0A%0A  public boolean isMineTile() %7B%0A    return isMine;%0A  %7D%0A%0A  public boolean isRevealedTile() %7B%0A    return isRevealed;%0A  %7D%0A%0A  private void reveal() %7B%0A    isRevealed = true;%0A%0A  %7D%0A%0A  public void setNumber(int number) %7B%0A    this.number = number;%0A  %7D%0A%0A  public int getNumber() %7B%0A    return number;%0A  %7D%0A%7D%0A

Add first draft of Tile class