2-APL UPC project.
0
fork

Configure Feed

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

added updatepoints

fdesan 186c2b0a 5b41fa3c

+13
+6
code/2apl_platform/environments/cardtable/Env.java
··· 177 177 return wrapBoolean(true); 178 178 } 179 179 180 + public Term updatePoints(String sAgent, APLNum points) throws ExternalActionFailedException { 181 + Agent agent = getAgent(sAgent); 182 + table.updateBid(agent.getName(), agent._position, points.toInt()); 183 + return wrapBoolean(true); 184 + } 185 + 180 186 public Term updateBid(String sAgent, APLNum bid) throws ExternalActionFailedException { 181 187 Agent agent = getAgent(sAgent); 182 188 table.updateBid(agent.getName(), agent._position, bid.toInt());
+7
code/2apl_platform/environments/cardtable/Table.java
··· 144 144 setVisible( true ); 145 145 } 146 146 147 + public void updatePoints(String name, int position, int points) { 148 + Integer pointsInt = new Integer(points); 149 + JLabel pointsLab = (JLabel) playersPane[position].getComponent(2); 150 + pointsLab.setText("Points: "+pointsInt.toString()); 151 + setVisible( true ); 152 + } 153 + 147 154 public void updateBid(String name, int position, int bid) { 148 155 Integer bidInt = new Integer(bid); 149 156 JLabel bidLab = (JLabel) playersPane[position].getComponent(1);