The algorithm to put in MM is easy, when either opponent selects their players have the server tali up buildings by th lvl, defense count and lvl as well as heroes, next tali up non defensive buildings by lvl, and last tali up offensive troops by lvl, then all the code written will have to do is:
in it main() {
if +-= to greater or less than "either + or - 1"
//(code to do math here)
//
else if +-= to greater or less than "either - or + 1"
//(code to do math here)
//
compare total and round off
}
Run fun time launching







