Exemple #1
0
        public ClientGame createGame(GamePreferences preferecnces)
        {
            if (!AuthManager.Instance.containsConnection(Context.ConnectionId))
            {
                return(null);
            }
            string            userName = AuthManager.Instance.GetNameByConnectionId(Context.ConnectionId);
            GameCenterService gc       = new GameCenterService();
            ClientGame        game     = gc.createGame(preferecnces, userName);

            return(game);
        }
Exemple #2
0
        public void Before()
        {
            if (GameService.testable)
            {
                gs = new GameService();
            }
            else
            {
                gs = new GameServiceStub();
            }
            us = new SystemService();
            gc = new GameCenterService();

            userName = "******";
            Password = "******";
            us.register(userName, Password);
            us.login(userName, Password);
            GamePreferences pref = new GamePreferences(8, 2, 5, 10, 1, 2, 3, true);

            gameID = gc.createGame(pref, userName).getID();
        }