Пример #1
0
        public void GetAnimState_ReturnsExpected_BasedOnState(GamePieceStates i_state, string i_expectedValue)
        {
            GamePiecePM systemUnderTest = CreateSystem();

            string state = systemUnderTest.GetAnimState(i_state);

            Assert.AreEqual(i_expectedValue, state);
        }
Пример #2
0
        public void IsSelectable_ReturnsAsExpected(GamePieceStates i_state, bool i_expected)
        {
            GamePiece systemUnderTest = SystemFactory.Create(0, 0);

            systemUnderTest.State = i_state;

            bool isSelectable = systemUnderTest.IsSelectable();

            Assert.AreEqual(i_expected, isSelectable);
        }
Пример #3
0
        public string GetAnimState(GamePieceStates i_state)
        {
            switch (i_state)
            {
            case GamePieceStates.Correct:
                return(CHAIN_COMPLETE_TRIGGER);

            case GamePieceStates.Incorrect:
                return(CHAIN_DROPPED_TRIGGER);

            default:
                return(string.Empty);
            }
        }
Пример #4
0
 private void SetPieceState(GamePieceStates i_state)
 {
     State = i_state;
 }
Пример #5
0
 public GamePiece(int i_pieceType, int i_pieceIndex)
 {
     Index     = i_pieceIndex;
     PieceType = i_pieceType;
     State     = GamePieceStates.Selectable;
 }