예제 #1
0
        public void before()
        {
            //  gc = GameCenter.GameCenterFactory.getInstance();
            if (GameCenterService.testable)
            {
                gc = new GameCenterService();
            }
            else
            {
                gc = new GameCenterStub();
            }
            us    = new SystemService();
            prefs = new GamePreferences(8, 2, 5, 10, 1, 20, 3, true);
            UserProfile ohadUser = new UserProfile("ohad", "213");

            us.register(ohadUser.Username, "213");
            gc.createGame(prefs, ohadUser.Username);
            prefs = new GamePreferences(8, 2, 5, 10, 1, 20, 3, false);
            gc.createGame(prefs, ohadUser.Username);

            //us = new SystemService();
            us.register("abc", "123");
            us.login("abc", "123");

            us.register("abc2", "123");
            us.login("abc2", "123");

            us.register("abc3", "123");
            us.login("abc3", "123");
        }
예제 #2
0
 public void before()
 {
     us = new SystemService();
     if (GameCenterService.testable)
     {
         gc = new GameCenterService();
     }
     else
     {
         gc = new GameCenterStub();
     }
     GameCenter.GameCenterFactory.getInstance().createNewLeague(0);
     us.register("ohad", "213");
 }
예제 #3
0
 public void before()
 {
     us = new SystemService();
     us.register(username, password);
     us.login(username, password);
     gameService = new GameService();
     if (GameCenterService.testable)
     {
         gc = new GameCenterService();
     }
     else
     {
         gc = new GameCenterStub();
     }
     pref = new GamePreferences(8, 2, 5, 10, 1, 2, 3, true);
 }