示例#1
0
 public static void ResetGame()
 {
     CheckerManager.ResetCheckersPosition();
     CheckerManager.ResetCheckersState();
     FieldManager.ResetFieldStates();
     CameraManager.SetCameraToBoardPosition();
 }
示例#2
0
        public void ResetCheckersPositionTest()
        {
            TurnSystem.InitializeData();

            GameMechanics.Move(CheckerManager.BrownCheckers[0].GameObj, new Vector3(5, 0.3f, 5));
            CheckerManager.ResetCheckersPosition();

            GameMechanics.ResetGame();

            Assert.AreEqual(CheckerManager.BrownCheckers[0].GameObj.transform.position, CheckerManager.BrownDefaultPositions[0]);
        }
        public void FieldUnderCheckerTest2()
        {
            TurnSystem.InitializeData();

            GameMechanics.Move(CheckerManager.BrownCheckers[10].GameObj, new Vector3(2, 0, 4));
            Field field = FieldManager.FieldUnderChecker(CheckerManager.BrownCheckers[10].GameObj);

            CheckerManager.ResetCheckersPosition();
            FieldManager.ResetFieldStates();

            GameMechanics.ResetGame();

            Assert.AreEqual(GameObject.Find("Black (16)"), field.GameObject);
        }
        public void FieldWithGameObjectTest()
        {
            TurnSystem.InitializeData();

            GameMechanics.Move(CheckerManager.BrownCheckers[10].GameObj, new Vector3(2, 0, 4));
            Field field  = FieldManager.FieldUnderChecker(CheckerManager.BrownCheckers[10].GameObj);
            Field field2 = FieldManager.FieldWithGameObject(field.GameObject);

            CheckerManager.ResetCheckersPosition();
            FieldManager.ResetFieldStates();

            GameMechanics.ResetGame();

            Assert.AreEqual(FieldManager.BlackFieldsBoard[15], field2);
        }