package jrummikub.view;

import java.awt.Color;
import java.io.File;
import java.util.Collection;

import jrummikub.model.Stone;
import jrummikub.model.StoneSet;
import jrummikub.util.IEvent;
import jrummikub.util.IEvent1;
import jrummikub.util.MockEvent;
import jrummikub.util.MockEvent1;

/**
 * Mock class for View
 */
public class MockView implements IView {
	/** */
	public MockSettingsPanel settingsPanel = new MockSettingsPanel();
	/** */
	public MockScorePanel scorePanel = new MockScorePanel();
	/** */
	public MockPlayerPanel playerPanel = new MockPlayerPanel();
	/** */
	public MockTablePanel tablePanel = new MockTablePanel();
	/** */
	public MockHandPanel handPanel = new MockHandPanel();
	/** */
	public MockLoginPanel loginPanel = new MockLoginPanel();
	/** */
	public MockGameListPanel gameListPanel = new MockGameListPanel();
	/** */
	public MockQuitWarningPanel quitWarningPanel = new MockQuitWarningPanel();
	/** */
	public MockConnectPanel connectPanel = new MockConnectPanel();
	/** */
	public boolean isSettingsPanelVisible = false;
	/** */
	public boolean isScorePanelVisible = false;
	/** */
	public boolean isLoginPanelVisible = false;
	/** */
	public boolean isGameListPanelVisible = false;
	/** */
	public boolean isQuitWarningPanelVisible = false;
	/** */
	public boolean isSidePanelVisible = false;
	/** */
	public boolean isConnectPanelVisible = false;
	/** */
	public boolean pauseModeEnabled = false;
	/** */
	public boolean isPaused = false;
	/** */
	public boolean savingEnabled = false;
	/** */
	public boolean loadingError = false;

	/** */
	public Collection<Stone> selectedStones;

	/** */
	public String currentPlayerName;
	/** */
	public BottomPanelType bottomPanelType;

	/** */
	public MockEvent startTurnEvent = new MockEvent();
	/** */
	public MockEvent quitEvent = new MockEvent();
	/** */
	public MockEvent newRoundEvent = new MockEvent();
	/**	 */
	public MockEvent newGameEvent = new MockEvent();
	/**	 */
	public MockEvent menuNewGameEvent = new MockEvent();
	/**	 */
	public MockEvent loadEvent = new MockEvent();
	/**	 */
	public MockEvent1<File> saveEvent = new MockEvent1<File>();
	/**	 */
	public MockEvent pauseEvent = new MockEvent();
	/**	 */
	public MockEvent endPauseEvent = new MockEvent();
	/** */
	public MockEvent networkGameEvent = new MockEvent();
	/** */
	public MockEvent acknowledgeInvalidEvent = new MockEvent();
	/** */
	public MockEvent acknowledgeConnectionLostEvent = new MockEvent();
	/** */
	public MockEvent1<File> loadFileEvent = new MockEvent1<File>();

	@Override
	public MockTablePanel getTablePanel() {
		return tablePanel;
	}

	@Override
	public MockPlayerPanel getPlayerPanel() {
		return playerPanel;
	}

	@Override
	public MockHandPanel getHandPanel() {
		return handPanel;
	}

	@Override
	public void setCurrentPlayerName(String playerName) {
		currentPlayerName = playerName;
	}

	@Override
	public void setSelectedStones(Collection<Stone> stones) {
		selectedStones = stones;
	}

	@Override
	public IEvent getStartTurnEvent() {
		return startTurnEvent;
	}

	@Override
	public IEvent getAcknowledgeInvalidEvent() {
		return acknowledgeInvalidEvent;
	}

	@Override
	public IEvent getAcknowledgeConnectionLostEvent() {
		return acknowledgeConnectionLostEvent;
	}

	@Override
	public IEvent getEndProgramEvent() {
		return quitEvent;
	}

	@Override
	public IEvent getNewRoundEvent() {
		return newRoundEvent;
	}

	@Override
	public ISettingsPanel getSettingsPanel() {
		return settingsPanel;
	}

	@Override
	public IGameListPanel getGameListPanel() {
		return gameListPanel;
	}

	@Override
	public IScorePanel getScorePanel() {
		return scorePanel;
	}

	@Override
	public ILoginPanel getLoginPanel() {
		return loginPanel;
	}

	@Override
	public IConnectPanel getConnectPanel() {
		return connectPanel;
	}

	@Override
	public ISidePanel getSidePanel() {
		return new MockSidePanel();
	}

	@Override
	public MockQuitWarningPanel getQuitWarningPanel() {
		return quitWarningPanel;
	}

	@Override
	public void showSettingsPanel(boolean show) {
		isSettingsPanelVisible = show;
	}

	@Override
	public void showScorePanel(boolean show) {
		isScorePanelVisible = show;
	}

	@Override
	public void showSidePanel(boolean show) {
		isSidePanelVisible = show;
	}

	public void showQuitWarningPanel(boolean show) {
		isQuitWarningPanelVisible = show;
	}

	@Override
	public void showLoginPanel(boolean show) {
		isLoginPanelVisible = show;
	}

	@Override
	public void showGameListPanel(boolean show) {
		isGameListPanelVisible = show;
	}

	@Override
	public void showConnectPanel(boolean show) {
		isConnectPanelVisible = show;

	}

	@Override
	public void setCurrentPlayerColor(Color color) {
		// TODO Auto-generated method stub
	}

	@Override
	public void setCurrentPlayerHasLaidOut(boolean hasLaidOut) {
		// TODO Auto-generated method stub
	}

	@Override
	public IEvent getNewGameEvent() {
		return newGameEvent;
	}

	@Override
	public void setBottomPanel(BottomPanelType type) {
		bottomPanelType = type;
	}

	@Override
	public IEvent getMenuNewGameEvent() {
		return menuNewGameEvent;
	}

	@Override
	public IEvent getLoadEvent() {
		return loadEvent;
	}

	@Override
	public IEvent1<File> getSaveEvent() {
		return saveEvent;
	}

	@Override
	public void clearView() {
	}

	@Override
	public void enablePauseMode(boolean enable) {
		pauseModeEnabled = enable;
	}

	@Override
	public IEvent getPauseEvent() {
		return pauseEvent;
	}

	@Override
	public IEvent getEndPauseEvent() {
		return endPauseEvent;
	}

	@Override
	public IEvent getNetworkGameEvent() {
		return networkGameEvent;
	}

	@Override
	public void setInitialMeldError(int points) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setStoneCollectionHidden(boolean enable) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setInitialMeldFirstError() {
		// TODO Auto-generated method stub

	}

	@Override
	public void setInvalidStoneSets(Collection<StoneSet> sets) {
		// TODO Auto-generated method stub

	}

	@Override
	public void showLoadingError() {
		loadingError = true;
	}

	@Override
	public void enableSave(boolean enable) {
		savingEnabled = enable;
	}

	@Override
	public IEvent getQuitEvent() {
		return quitEvent;
	}

	@Override
	public IEvent1<File> getLoadFileEvent() {
		return loadFileEvent;
	}

	@Override
	public void load() {
		// TODO Auto-generated method stub
	}

	@Override
	public void setMayPause(boolean mayPause) {
		// TODO Auto-generated method stub

	}

	@Override
	public void resetLoginPanel() {
		// TODO Auto-generated method stub

	}

	@Override
	public void showServerStartupError(boolean alreadyRunning) {
		// TODO Auto-generated method stub

	}

	public void setRedealedPlayerName(String name) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setLastStonePlayerName(String name) {
		// TODO Auto-generated method stub

	}
}
