So I went to the API released by PGI and noticed something...
Quote
"1768": {
"name": "Dumaring",
"position": {
"x": "80",
"y": "225"
},
"owner": {
"id": "11",
"name": "Smoke Jaguar",
"icon": "https://static.mwomercs.com/img/house/clansmokejaguar.png"
},
"invading": {
"id": "0",
"name": "None",
"icon": ""
},
"contested": "1",
"defense_level": "0",
"total_territories": "15",
"territories": [
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"
],
"unit": {
"id": "98",
"name": "-SA-"
},
"rules": {
"min_tonnage": "160",
"max_tonnage": "240",
"dropship": "1"
}
},
Notice that there is no invader... that's correct, then why is it showing up, the contested flag is set to "0" if it's not contested (which other planets are) and contested planets have "1". However as you can see it is marked as contested without an invader being selected. Is this bugs in your coding or values aren't being updated correctly which is causing other algorithm problems?