+ 2
I guess they have a matchmaking algorithm which looks what kind of players are relevant for you to challenge.
Just google on Clash of Clans matchmaking algoritm to learn more
+ 2
As long as a language is turing complete (google it if you don't know what it means) it should be possible. Asuming they could implement it in python, java, c, c# but also in C++ et cetera.
The language they choose will more depent on quality attributes like performance.
Straight answer to your question:https://www.quora.com/What-programming-language-is-used-in-Clash-of-Clan-Game
+ 1
https://en.m.wikipedia.org/wiki/Elo_rating_system
Used in most of games.
0
Utkarsh as said in the link above, clash of clans is coded in objective c and c++
the server however is coded in java, and seeing as matchmaking is probably handled by the server, the language you are looking for is java