示例#1
0
    public void CmdAskToSetDigit(int d, int h, int v)
    {
        Match m   = viewHolder.GetMatch();
        int   dig = m.GetValueAt(h, v);

        if (dig < 10)
        {
            if (dig == d % 10) // Correct
            {
                RpcSetDigit(d, h, v);
                m.SetDigitAt(d, h, v);
                if (m.IsFull())
                {
                    int s = m.GetSkillLevel();
                    m.SetSkillLevel(s, viewHolder.networker.GetSolutionForDifficulty(s));
                    RpcFadeInNewBoard();
                }
            }
            else // Incorrect
            {
                RpcWrongDigit(d, h, v);
                m.WrongDigit(d);
            }
        }
    }