public void SupervisorCleansOutdatedGames() { var logger = new Mock <ILogger <GameSupervisor> >(); var supervisor = new GameSupervisor(logger.Object, 100); var player = new Player("Player1"); var game = supervisor.NewGame(player); var gamesBeforeClean = supervisor.CountGames(); Thread.Sleep(150); Assert.Equal(1, gamesBeforeClean); Assert.Equal(0, supervisor.CountGames()); }
private void Awake() { #region Singleton if (GameSupervisor.Instance == null) { Instance = this; } #endregion #region VRController isTrigger = false; isGrip = false; isTouchPad = false; //OpacityColor = new Color32(30, 30, 30, 80); HightLightColor = new Color32(0, 255, 0, 255); #endregion #region TutorialBool isTutorial = true; isHandTutorial = new bool[5]; isMainTutorial = new bool[5]; isDrawer = new bool[2]; isDoor = new bool[2]; #endregion #region TurorialText MainTutorialText = new string[10]; MainTutorialText[0] = " "; MainTutorialText[1] = "Tutorial"; MainTutorialText[2] = "StartGame"; MainTutorialText[3] = "1"; MainTutorialText[4] = "2"; MainTutorialText[5] = "3"; MainTutorialText[6] = "4"; MainTutorialText[7] = "4"; MainTutorialText[8] = "End!"; #endregion #region TutorialObject Door = GameObject.Find("Door"); Drawer = GameObject.Find("Drawer"); Potal = GameObject.Find("Potal"); #endregion }