Exemplo n.º 1
0
	def __repr__(self):
		text = Power.__repr__(self).decode('latin-1')
		if self.elect:
			text += 'ELECT %s\n' % ' '.join(map(':'.join, self.elect.items()))
		for power in self.sent: text += 'SENT %s\n' % power
		if self.accept and not self.isEliminated(False, True):
			text += 'ACCEPT %s\n' % self.accept
		if self.state: text += 'STATE %s\n' % self.state
		for offer in self.sheet: text += '%s\n' % offer
		return text.encode('latin-1')
Exemplo n.º 2
0
	def __repr__(self):
		text = Power.__repr__(self).decode('latin-1')
		if self.orders: text += 'ORDERS\n'
		for unit, order in self.orders.items():
			#	-----------------------------
			#	Handle "REORDER", "INVALID",
			#	and "ORDER" (NO_CHECK) orders
			#	-----------------------------
			if unit[0] not in 'RIO': text += unit + ' '
			text += order + '\n'
		return text.encode('latin-1')
Exemplo n.º 3
0
 def __repr__(self):
     text = Power.__repr__(self).decode('latin-1')
     for listName, orders in self.list.items():
         if orders: text += '%s\n%s\n' % (listName, '\n'.join(orders))
     return text.encode('latin-1')
Exemplo n.º 4
0
	def __repr__(self):
		text = Power.__repr__(self).decode('latin-1')
		for listName, orders in self.list.items():
			if orders: text += '%s\n%s\n' % (listName, '\n'.join(orders))
		return text.encode('latin-1')