mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
minor api changes in preparation for Gui_WinLose refactoring
This commit is contained in:
@@ -618,11 +618,7 @@ public class GameAction {
|
||||
if (checkEndGameSate()) {
|
||||
AllZone.getDisplay().savePrefs();
|
||||
frame.dispose();
|
||||
if (!Constant.Quest.fantasyQuest[0])
|
||||
new Gui_WinLose();
|
||||
else
|
||||
new Gui_WinLose(Constant.Quest.humanList[0], Constant.Quest.computerList[0],
|
||||
Constant.Quest.humanLife[0], Constant.Quest.computerLife[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1124,20 +1124,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
|
||||
savePrefs();
|
||||
dispose();
|
||||
Constant.Runtime.matchState.addLose();
|
||||
if (!Constant.Quest.fantasyQuest[0])
|
||||
new Gui_WinLose();
|
||||
else {
|
||||
//new Gui_WinLose(Constant.Quest.humanList[0], Constant.Quest.computerList[0],Constant.Quest.humanLife[0], Constant.Quest.computerLife[0]);
|
||||
CardList humanList = forge.quest.data.QuestUtil.getHumanPlantAndPet(AllZone.getQuestData(), AllZone.getQuestAssignment());
|
||||
CardList computerList = forge.quest.data.QuestUtil.getComputerCreatures(AllZone.getQuestData(), AllZone.getQuestAssignment());
|
||||
|
||||
int humanLife = AllZone.getQuestData().getLife();
|
||||
int computerLife = 20;
|
||||
|
||||
if (AllZone.getQuestAssignment() != null)
|
||||
computerLife = AllZone.getQuestAssignment().getComputerLife();
|
||||
new Gui_WinLose(humanList, computerList, humanLife, computerLife);
|
||||
}
|
||||
}
|
||||
|
||||
// ********** Phase stuff in Display ******************
|
||||
|
||||
@@ -370,7 +370,7 @@ public class QuestData {
|
||||
/**
|
||||
* <p>addCards.</p>
|
||||
*/
|
||||
public void addCards() {
|
||||
public ArrayList<String> addCards() {
|
||||
Generator<Card> cards = YieldUtils.toGenerator(AllZone.getCardFactory());
|
||||
int nCommon = QuestPreferences.getNumCommon();
|
||||
int nUncommon = QuestPreferences.getNumUncommon();
|
||||
@@ -385,7 +385,7 @@ public class QuestData {
|
||||
|
||||
//getAddedCards() uses newCardList
|
||||
newCardList = newCards;
|
||||
|
||||
return newCards;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -143,4 +143,21 @@ public class QuestMatchState {
|
||||
public boolean didWinRecently() {
|
||||
return winRecently;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>isMatchOver.</p>
|
||||
* @return whether match is complete
|
||||
*/
|
||||
public boolean isMatchOver()
|
||||
{
|
||||
return win == 2 || lose == 2;
|
||||
}
|
||||
/**
|
||||
* <p>isMatchOver.</p>
|
||||
* @return whether match is won
|
||||
*/
|
||||
public boolean isMatchWon()
|
||||
{
|
||||
return win == 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user