C++ (single pass)
\n    bool winnerOfGame(string colors) {\n        int a = 0, b = 0, s = colors.size();\n        for (int i = 0; i < s-2; ++i) {\n            if (colors[i] == \'
```\n    bool winnerOfGame(string colors) {\n        int a = 0, b = 0, s = colors.size();\n        for (int i = 0; i < s-2; ++i) {\n            if (colors[i] == \'A\' && colors[i+1] == \'A\' && colors[i+2] == \'A\')\n                a++;\n            else if (colors[i] == \'B\' && colors[i+1] == \'B\' && colors[i+2] == \'B\')\n                b++;\n        }\n        return a > b;\n    }\n```
['C']