Skip to content

Instantly share code, notes, and snippets.

@lilac
Created October 16, 2013 03:45
Show Gist options
  • Save lilac/7002387 to your computer and use it in GitHub Desktop.
Save lilac/7002387 to your computer and use it in GitHub Desktop.
class Auctioneer {
typedef float Currency;
Currency price;
std::vector<Currency> bids;
public:
/** Accept a buyer's bid.
* id int Buyer's id.
* price Currency Buyer's bid price.
*/
void bid(int id, Currency price);
Currency currentPrice();
void update();
};
class Buyer {
int id;
// Other fields here.
public:
void bid(Auctioneer &a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment