Exemplo n.º 1
0
    private void compareHook(CompareHook hook)
    {
        bool vowel = false;

        if (hook.objective == "Which event occured in 1492?" && hook.input == 'A')
        {
            vowel = true;
        }
        if (hook.objective == "Which event occured in 1776?" && hook.input == 'B')
        {
            vowel = true;
        }
        if (hook.objective == "Which event occured in 1861?" && hook.input == 'C')
        {
            vowel = true;
        }
        if (vowel)
        {
            lastActionValid = true;
        }
        else
        {
            lastActionValid = false;
        }
    }
Exemplo n.º 2
0
    private void compareHook(CompareHook hook)
    {
        bool vowel = false;

        if (hook.input == 'A' || hook.input == 'E' || hook.input == 'I')
        {
            vowel = true;
        }
        if (vowel)
        {
            lastActionValid = true;
        }
        else
        {
            lastActionValid = false;
        }
    }
Exemplo n.º 3
0
    private void compareHook(CompareHook hook)
    {
        bool smallest = true;

        for (int i = 0; i < hook.compares.Length; i++)
        {
            if (hook.compares[i] < hook.input)
            {
                smallest = false;
            }
        }
        if (smallest)
        {
            lastActionValid = true;
        }
        else
        {
            lastActionValid = false;
        }
    }