public MainMenu(INetwork endpoint, IMainMenuNetwork mainMenu, IGameBoardNetwork gameNetwork) { this.endpoint = endpoint; this.mainMenu = mainMenu; this.gameNetwork = gameNetwork; InitializeComponent(); this.mainMenu.MainMenuSetupSocket(); this.SignIn.Click += new System.EventHandler(this.SignIn_Click); this.SignUp.Click += new System.EventHandler(this.SignUp_Click); this.CreateMatch.Click += new System.EventHandler(this.CreateMatch_Click); this.CreateMatch.Visible = false; this.loadGameButton.Visible = false; this.loadGameBox.Visible = false; }
public GameBoard(IGameBoardNetwork gameNetwork, Game game, User user) { this.user = user; this.gameNetwork = gameNetwork; InitializeCommunication(); this.game = game; myTurn = false; TURN = 0; this.lostTiles = new Tile[NumberOfQuestions]; this.tiles = this.game.tiles; this.nations = this.game.nations; InitializeComponent(); setupGameBoard(); this.title.Text = game.gameName; }
static void Main() { INetwork network = Network.Instance; network.SetEndPointLocation("http://trivianation.herokuapp.com"); IMainMenuNetwork mainMenuNetwork = MainMenuNetwork.Instance; mainMenuNetwork.setNetwork(network); IGameBoardNetwork gameNetwork = GameBoardNetwork.Instance; gameNetwork.setGameBoardNetwork(network); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new GUILayer.MainMenu(network, mainMenuNetwork, gameNetwork)); }
public EditGameBoard(IGameBoardNetwork gameNetwork) { this.gameNetwork = gameNetwork; this.gameNetwork.editGameBoardSetupSocket(); this.game = new Game(); this.tiles = new Tile[NumberOfQuestions]; this.nations = new Team[NumberOfNations]; for (int n = 0; n < NumberOfNations; n++) { this.nations[n] = new Team(); } for (int i = 0; i < NumberOfQuestions; i++) { this.tiles[i] = new Tile(); this.tiles[i].questionNum = i; this.tiles[i].answers = new Answer[NumberOfAnswers]; for (int j = 0; j < NumberOfAnswers; j++) { this.tiles[i].answers[j] = new Answer(); } } InitializeComponent(); }