package jrummikub.view; import java.awt.Color; import java.util.HashSet; import java.util.Set; import jrummikub.model.GameSettings; import jrummikub.model.PlayerSettings.Type; import jrummikub.model.StoneColor; import jrummikub.util.IEvent; import jrummikub.util.IEvent1; import jrummikub.util.IEvent2; import jrummikub.util.MockEvent; import jrummikub.util.MockEvent1; import jrummikub.util.MockEvent2; /** */ public class MockSettingsPanel implements ISettingsPanel { /** */ public MockEvent addPlayerEvent = new MockEvent(); /** */ public MockEvent1 removePlayerEvent = new MockEvent1(); /** */ public MockEvent2 changePlayerColorEvent = new MockEvent2(); /** */ public MockEvent2 changePlayerNameEvent = new MockEvent2(); /** */ public MockEvent2 changePlayerTypeEvent = new MockEvent2(); /** */ public MockEvent startGameEvent = new MockEvent(); /** */ public MockEvent networkGameEvent = new MockEvent(); /** */ public SettingsError error = SettingsError.NO_ERROR; /** */ public boolean startButtonEnabled = true; /** */ public boolean addPlayerButtonEnabled = true; /** */ public boolean removePlayerButtonsEnabled = false; /** */ public MockEvent setVariantDefaultEvent = new MockEvent(); /** */ public MockEvent setVariantChildrenEvent = new MockEvent(); /** */ public MockEvent1 changeInitialMeldThresholdEvent = new MockEvent1(); /** */ public MockEvent1 changeJokerNumberEvent = new MockEvent1(); /** */ public MockEvent1 changeStoneSetNumberEvent = new MockEvent1(); /** */ public MockEvent1 changeNumberOfStonesDealtEvent = new MockEvent1(); /** */ public MockEvent1 changeHighestValueEvent = new MockEvent1(); /** */ public MockEvent1 changeTimeEvent = new MockEvent1(); /** */ public MockEvent1 changeNoLimitsEvent = new MockEvent1(); /** */ public MockEvent1> changeStoneColorsEvent = new MockEvent1>(); /** */ public int initialMeldThreshold; /** */ public int jokerNumber; /** */ public int stoneSetNumber; /** */ public int numberOfStonesDealt; /** */ public int highestValue; /** */ public Set stoneColors; private MockEvent backEvent = new MockEvent(); @Override public IEvent getAddPlayerEvent() { return addPlayerEvent; } @Override public IEvent1 getRemovePlayerEvent() { return removePlayerEvent; } @Override public IEvent2 getChangePlayerColorEvent() { return changePlayerColorEvent; } @Override public IEvent2 getChangePlayerNameEvent() { return changePlayerNameEvent; } @Override public IEvent1 getChangeInitialMeldThresholdEvent() { return changeInitialMeldThresholdEvent; } @Override public IEvent1 getChangeNumberOfStonesDealtEvent() { return changeNumberOfStonesDealtEvent; } @Override public IEvent1 getChangeHighestValueEvent() { return changeHighestValueEvent; } @Override public IEvent1> getChangeStoneColorsEvent() { return changeStoneColorsEvent; } @Override public IEvent getStartGameEvent() { return startGameEvent; } @Override public void setError(SettingsError error) { this.error = error; } @Override public void enableStartGameButton(boolean enable) { startButtonEnabled = enable; } @Override public void enableAddPlayerButton(boolean enable) { addPlayerButtonEnabled = enable; } @Override public void enableRemovePlayerButtons(boolean enable) { removePlayerButtonsEnabled = enable; } @Override public void setGameSettings(GameSettings gameSettings) { initialMeldThreshold = gameSettings.getInitialMeldThreshold(); jokerNumber = gameSettings.getJokerNumber(); stoneSetNumber = gameSettings.getStoneSetNumber(); numberOfStonesDealt = gameSettings.getNumberOfStonesDealt(); highestValue = gameSettings.getHighestValue(); stoneColors = new HashSet(gameSettings.getStoneColors()); } @Override public IEvent1 getChangeJokerNumberEvent() { return changeJokerNumberEvent; } @Override public IEvent2 getChangePlayerTypeEvent() { return changePlayerTypeEvent; } @Override public IEvent1 getChangeStoneSetNumberEvent() { return changeStoneSetNumberEvent; } @Override public IEvent1 getChangeTimeEvent() { return changeTimeEvent; } @Override public IEvent1 getChangeNoLimitsEvent() { return changeNoLimitsEvent; } @Override public IEvent getSetVariantDefaultEvent() { return setVariantDefaultEvent; } @Override public IEvent getSetVariantChildrenEvent() { return setVariantChildrenEvent; } @Override public void enableNetworkMode(boolean enable) { // TODO Auto-generated method stub } @Override public IEvent getBackEvent() { return backEvent; } }