2-APL UPC project.
0
fork

Configure Feed

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

added @cardtable(updateBid(BID)) and @cardtable(updateScore(SCORE))

cyberslas 3d0586f3 1e7436e7

+15 -6
+7 -6
code/2apl_platform/briscola_chiamata/notary.2apl
··· 10 10 Beliefs: 11 11 gatekeeper(gk). /* we know who the gatekeeper is, for simplicity */ 12 12 dealer(d). 13 - currentturn(0). /* the first turn is for the agent in postion 0 */ 13 + currentturn(-1). /* the first turn is for the agent in postion 0 */ 14 14 15 15 getpoints(jack, X) :- X is 2 16 16 getpoints(queen, X) :- X is 3 ··· 156 156 { 157 157 B( assigned(0, P0)); 158 158 B( cardontable(S0, R0, P0) and getpoints(S0, X0)); 159 - 159 + send(P0, inform, yourscore(X0)); 160 160 B( assigned(1, P1)); 161 161 B( cardontable(S1, R1, P1) and getpoints(S1, X1)); 162 - 162 + send(P1, inform, yourscore(X1)); 163 163 B( assigned(2, P2)); 164 164 B( cardontable(S2, R2, P2) and getpoints(S2, X2)); 165 - 165 + send(P2, inform, yourscore(X2)); 166 166 B( assigned(3, P3)); 167 167 B( cardontable(S3, R3, P3) and getpoints(S3, X3)); 168 - 168 + send(P3, inform, yourscore(X3)); 169 169 B( assigned(4, P4)); 170 - B( cardontable(S4, R4, P4) and getpoints(S4, X4)) 170 + B( cardontable(S4, R4, P4) and getpoints(S4, X4)); 171 + send(P4, inform, yourscore(X4)) 171 172 }
+8
code/2apl_platform/briscola_chiamata/player.2apl
··· 141 141 print("I bid!"); 142 142 AddBidHistorical(61, Me); 143 143 AddLastBid(61); 144 + @cardtable(updateBid(61)); 144 145 send(Next, inform, bid(61, Pos)) 145 146 } 146 147 ··· 158 159 { 159 160 print("I bid!"); 160 161 AddBidHistorical(LB + 1, Me); 162 + @cardtable(updateBid(LB + 1)); 161 163 send(Next, inform, bid(LB + 1, Pos)); 162 164 RemoveLastBid(LB); 163 165 AddLastBid(LB + 1) ··· 212 214 { 213 215 endround() 214 216 } 217 + } 218 + 219 + message(n, inform, _, _, yourscore(Y)) <- true | 220 + { 221 + B( assigned(Pos, Me) ); 222 + @cardtable(updateScore(Me, Y)) 215 223 } 216 224 217 225 endround() <- hand([]) |