private void buyLevelsButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_buyLevelsButtonActionPerformed ArrayList<Treasure> selHidden = getSelectedTreasures(hiddenTreasuresPanel); ArrayList<Treasure> selVisible = getSelectedTreasures(visibleTreasuresPanel); napakalakiModel.buyLevels(selVisible, selHidden); setPlayer(napakalakiModel.getCurrentPlayer()); repaint(); } // GEN-LAST:event_buyLevelsButtonActionPerformed
private void makeTreasuresVisibleButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_makeTreasuresVisibleButtonActionPerformed ArrayList<Treasure> selHidden = getSelectedTreasures(hiddenTreasuresPanel); for (Treasure treasure : selHidden) { napakalakiModel.makeTreasureVisible(treasure); } setPlayer(napakalakiModel.getCurrentPlayer()); repaint(); } // GEN-LAST:event_makeTreasuresVisibleButtonActionPerformed
private void discardTreasuresButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_discardTreasuresButtonActionPerformed // Eliminación de tesoros. ArrayList<Treasure> selHidden = getSelectedTreasures(hiddenTreasuresPanel); ArrayList<Treasure> selVisible = getSelectedTreasures(visibleTreasuresPanel); for (Treasure treasure : selHidden) { napakalakiModel.discardHiddenTreasure(treasure); } for (Treasure treasure : selVisible) { napakalakiModel.discardVisibleTreasure(treasure); } setPlayer(napakalakiModel.getCurrentPlayer()); // Si el mal rollo es vacío, activamos el botón de equipar tesoros. if (playerModel.validState()) { this.enableMakeVisible(); } repaint(); } // GEN-LAST:event_discardTreasuresButtonActionPerformed