zloop1982 / bwapi

Automatically exported from code.google.com/p/bwapi
0 stars 0 forks source link

Add sendText and operator << to Player and Playerset #488

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The addition of sendText as a member of Player will allow the client to easily 
send private messages to specific players in the game (a lacking feature).

Similarly, this addition would also be made to Playerset so that messages can 
be sent to player groups.

This will allow the use of stuff like: Broodwar->allies().sendText("Hey!"), 
instead of using the unclear sendTextEx. It will also deprecate sendTextEx.

Then, we can put Player in a wrapper for overloading operator << like in 
Broodwar. The same operator << can easily be put into Playerset.

Code then becomes:
Broodwar->allies() << "Hey!" << endl;
someUnit->getPlayer() << "Your " << someUnit->getType() << " is in my way." << 
endl;

----
tl;dr

- Add sendText member to Player and Playerset.
- Add operator << overload to Playerset.
- Wrap Player to overload operator <<.
- Deprecate/repurpose sendTextEx.

Original issue reported on code.google.com by AHeinerm on 20 May 2013 at 5:00

GoogleCodeExporter commented 9 years ago
The BWAPI project is slowly undergoing the migration to GitHub. All issues have 
been migrated to the GitHub issue tracker located here: 
https://github.com/bwapi/bwapi/issues

In order to receive updates on your issue, please head over to the GitHub issue 
tracker and subscribe to your issue.

Original comment by AHeinerm on 15 Apr 2014 at 7:46