code: def _compute_diplomacy(self):
          
          self._diplomacy = {
              'teams': self.teams(),
              'ffa': len(self.teams()) == (self._player_num + self._computer_num and
                                           self._player_num + self._computer_num > 2),
              'TG':  len(self.teams()) == 2 and self._player_num + self._computer_num > 2,
              '1v1': self._player_num + self._computer_num == 2,
          }
          self._diplomacy['type'] = 'unknown'
          if self._diplomacy['ffa']:
              self._diplomacy['type'] = 'ffa'
          if self._diplomacy['TG']:
              self._diplomacy['type'] = 'TG'
              size = len(self.teams()[0]['player_numbers'])
              self._diplomacy['team_size'] = '{}v{}'.format(size, size)
          if self._diplomacy['1v1']:
              self._diplomacy['type'] = '1v1'
docs: Compute diplomacy.