1194 |
room game_challenged gametype timetype (some number of time vars?) |
room game_challenged gametype timetype (some number of time vars?) |
1195 |
wp handi komi existing_challenge_num (-1 if none) |
wp handi komi existing_challenge_num (-1 if none) |
1196 |
|
|
1197 |
(if wp = 0, p is B, if 1, W) |
Incoming data: if wp = 0, p is B, if 1, W |
1198 |
|
Outgoing data: wp applies to the challenger (that is |
1199 |
|
not the inviter). Example |
1200 |
|
|
1201 |
|
Joe sets up a game. Amy challenges and |
1202 |
|
wants to be W, so she set wp = 1. The |
1203 |
|
challenge is sent to both Joe and Amy |
1204 |
|
with wp = 1. |
1205 |
|
|
1206 |
|
|
1207 |
*/ |
*/ |
1208 |
|
|
1267 |
|
|
1268 |
std::stringstream ss; |
std::stringstream ss; |
1269 |
std::string s; |
std::string s; |
1270 |
|
//game num |
1271 |
ss << ogi->first; |
ss << ogi->first; |
1272 |
s = ss.str(); |
s = ss.str(); |
1273 |
s += " "; |
s += " "; |
1274 |
|
//gametype |
1275 |
|
ss.str(""); |
1276 |
|
ss << rm.open_challenges[i].gameType; |
1277 |
|
s += ss.str(); |
1278 |
|
s += " "; |
1279 |
|
//timetype |
1280 |
|
ss.str(""); |
1281 |
|
ss << rm.open_challenges[i].timeType; |
1282 |
|
s += ss.str(); |
1283 |
|
s += " "; |
1284 |
|
ss.str(""); |
1285 |
|
//wp |
1286 |
|
s += (wp?"1 ":"0 "); |
1287 |
|
//handi |
1288 |
|
ss.str(""); |
1289 |
|
ss << rm.open_challenges[i].handi; |
1290 |
|
s += ss.str(); |
1291 |
|
s += " "; |
1292 |
|
//komi |
1293 |
|
ss.str(""); |
1294 |
|
ss << rm.open_challenges[i].komi; |
1295 |
|
s += ss.str(); |
1296 |
|
s += " "; |
1297 |
|
//challenge num |
1298 |
ss.str(""); |
ss.str(""); |
1299 |
ss << i; |
ss << i; |
1300 |
s += ss.str(); |
s += ss.str(); |
1301 |
|
//challenger's login |
1302 |
|
s += " "; |
1303 |
|
s += parray[p].login; |
1304 |
|
|
1305 |
//ACK the player who sent this in |
//ACK the player who sent this in |
1306 |
ReplyOccupant(r, p, ROOM + MakeGameOffer, s); |
ReplyOccupant(r, p, ROOM + MakeGameOffer, s); |