nazdar.....co by mohlo chybat v tejto metode??pole je vykreslene ale dlazdice nie su clickable
@Override
public void mousePressed(MouseEvent e) {
if(field.getState() == GameState.PLAYING){
TileComponent b = (TileComponent)e.getSource();
if(SwingUtilities.isLeftMouseButton(e)){
field.openTile(b.getRow(),b.getColumn());
}
if(SwingUtilities.isRightMouseButton(e)){
TileComponent t = (TileComponent)e.getSource();
field.markTile(t.getRow(), t.getColumn());
}
}
if(field.getState() == GameState.FAILED){
JOptionPane.showMessageDialog(rootPane, menuBar, "Konec", 200);
}
if(field.getState() == GameState.SOLVED){
JOptionPane.showMessageDialog(rootPane, menuBar, "Top seller v hre", 200);
BestTimes b = new BestTimes();
int m = Minesweeper.getInstance().getPlayingSeconds();
b.addPlayerTime(System.getProperty("user.name"),m);
}
}