Beispiel #1
0
        // GENERAL

        public void SetRightOccupation(PinDataHandler pinData, RingDataHandler ringData, GameStatusDataHandler gameStatus)
        {
            pinData.AddToStack((int)ringData.GetColorValue());
            ringData.SetDataValue("pinCorrect", true);
            ringData.SetDataValue("pinned", true);
            gameStatus.SetStatus(GameStatus.RIGHTMOVE);
        }
Beispiel #2
0
 public void SetWrongOccupation(PinDataHandler pinData, RingDataHandler ringData, GameStatusDataHandler gameStatus)
 {
     ringData.SetDataValue("pinCorrect", false);
     ringData.SetDataValue("pinned", true);
     ringData.SetDataValue(RingExpression.WORRIED);
     gameStatus.SetStatus(GameStatus.WRONGMOVE);
 }
Beispiel #3
0
        public void UnPin(RingDataHandler data)
        {
            data.SetDataValue("pinned", false);

            if (data.GetBoolValue("grabbed"))
            {
                data.SetDataValue(RingExpression.WONDERING);
            }
            else
            {
                data.SetDataValue(RingExpression.HAPPY);
            }
        }
Beispiel #4
0
 public void SetVictory(PinDataHandler pinData, RingDataHandler ringData, GameStatusDataHandler gameStatus)
 {
     pinData.AddToStack((int)ringData.GetColorValue());
     ringData.SetDataValue("pinCorrect", true);
     ringData.SetDataValue("pinned", true);
     if (gameStatus.GetIntValue("targetPinID") == 0)
     {
         gameStatus.SetDataValue("targetPinID", 2);
         gameStatus.SetDataValue("lastVictoryPin", 0);
     }
     else
     {
         gameStatus.SetDataValue("targetPinID", 0);
         gameStatus.SetDataValue("lastVictoryPin", 2);
     }
     gameStatus.SetStatus(GameStatus.VICTORY);
 }