Example #1
0
 private void InitiateNetwork(string type)
 {
     var networkFactory = new UserNetworkFactory();
     var playerFactory = new ConcretePlayerFactory();
     _view.SetGameStatus("Awaiting Game Start");
     _localPlayer = playerFactory.CreatePlayer("network");
     _oponent = playerFactory.CreatePlayer("network");
     _network = networkFactory.CreateNetwork(type);
     SetPlayerRelatedData();
     _network.StartService();
 }
Example #2
0
        private void ResetGameAssests()
        {
            if (!_connected) return;

            var name = _localPlayer.Name;
            var playerFactory = new ConcretePlayerFactory();

            _localPlayer = new Player {Name = name};
            name = _oponent.Name;
            _oponent = playerFactory.CreatePlayer(_oponentType);
            _oponent.Name = name;

            _playerPanelEngine.ResetTiles();
            _oponentPanelEngine.ResetTiles();

            _view.SetPlaneOrientationVisibile(true);
            _view.SetGameStatus("Setting up Planes, You must set 4!");
        }
Example #3
0
 public void SetOponent(string type)
 {
     var playerFactory = new ConcretePlayerFactory();
     _oponent = playerFactory.CreatePlayer(type);
 }