Esempio n. 1
0
 public ClientNetworkStateContainer(Prompter prompter)
 {
     NotConnected    = new NotConnected();
     PendingLogOn    = new PendingLogOn(prompter);
     WaitingForBoard = new WaitingForBoard();
     PendingBoard    = new PendingBoard(prompter);
     WaitingForGame  = new WaitingForGame(prompter);
     FoundGame       = new FoundGame(prompter);
     InitialGame     = new InitialGame(prompter);
     MyTurn          = new MyTurn();
     TheirTurn       = new TheirTurn(prompter);
     Waiting         = new Waiting(prompter);
 }
        public ServerNetworkStateContainer(BspSender sender, IBspDisconnecter disconnecter,
                                           GameTypeRepository gameTypeRepo, UserRepository userRepo, MatchMaker matchMaker)
        {
            var state = new BspServerState();

            NotConnected    = new NotConnected(state, sender, gameTypeRepo, userRepo);
            PendingLogOn    = new PendingLogOn();
            WaitingForBoard = new WaitingForBoard(state, sender, gameTypeRepo, matchMaker);
            PendingBoard    = new PendingBoard();
            WaitingForGame  = new WaitingForGame(state, sender, disconnecter, userRepo);
            FoundGame       = new FoundGame(state, sender, disconnecter, userRepo);
            InitialGame     = new InitialGame();
            MyTurn          = new MyTurn(state, sender, disconnecter, userRepo);
            TheirTurn       = new TheirTurn();
            Waiting         = new Waiting();
        }