2-APL UPC project.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

corrected print list error

fdesan 78e08ef1 0f137bd2

+6 -3
+6 -3
code/2apl_platform/environments/cardtable/Env.java
··· 161 161 { 162 162 Agent d = getDealer(); 163 163 164 - 165 164 LinkedList returnList = new LinkedList(); 166 - // Send an external event to all agents within the senserange. 167 165 List deckList = deck.getDeck(); 166 + 167 + String deckStr = new String("[ "); 168 168 169 169 for (Iterator<Card> i = deckList.iterator( ); i.hasNext( ); ) { 170 170 Card card = i.next(); 171 171 Suit suit = card.getSuit(); 172 172 APLIdent id = new APLIdent(suit.getName()); 173 + deckStr += "<" + suit.getName() + ", "; 173 174 returnList.add(id); 174 175 Rank rank = card.getRank(); 175 176 id = new APLIdent(rank.getName()); 177 + deckStr += rank.getName() + ">, "; 176 178 returnList.add(id); 177 179 } 180 + deckStr += " ]"; 178 181 179 182 if (d!=null) 180 183 { 181 184 notifyAgents(new APLFunction(parm1,new APLList(returnList)), d.getName()); 182 - writeToLog("EVENT: "+parm1+"("+returnList.toString()+")"+" to "+d.getName()); 185 + writeToLog("EVENT: "+parm1+" "+deckStr+" "+" to "+d.getName()); 183 186 } 184 187 } 185 188