Exemplo n.º 1
0
    void Match(int x, int z, int vID)
    {
        switch (in_grid[x, z])
        {
        case 1:
            if (in_grid[x, z] != vID /*|| in_grid[z, x] != vID2*/)
            {
                redC.ClearCounter();
            }                                                                                  //return false; }
            redC.CollectMatches(x, z); break;

        //return true;
        case 4:
            if (in_grid[x, z] != vID /*|| in_grid[z, x] != vID2*/)
            {
                blueC.ClearCounter();
            }                                                                                   //return false; }
            blueC.CollectMatches(x, z); break;

        //return true;
        case 2:
            if (in_grid[x, z] != vID /*|| in_grid[z, x] != vID2*/)
            {
                greenC.ClearCounter();
            }                                                                                    //return false; }
            greenC.CollectMatches(x, z); break;

        //return true;
        case 3:
            if (in_grid[x, z] != vID /*|| in_grid[z, x] != vID2*/)
            {
                orangeC.ClearCounter();
            }                                                                                     //return false; }
            orangeC.CollectMatches(x, z); break;

        //return true;
        default: break;    // return false;
        }
    }