Rev | Line | |
---|
[287] | 1 | package onetomany.bargainingchipsgame.players;
|
---|
| 2 |
|
---|
| 3 | import java.util.concurrent.BlockingQueue;
|
---|
| 4 |
|
---|
[309] | 5 | import onetomany.bargainingchipsgame.NegotiationContext;
|
---|
[287] | 6 | import onetomany.bargainingchipsgame.interactions.Offer;
|
---|
[288] | 7 | import onetomany.bargainingchipsgame.players.utilityfunction.UtilityFunction;
|
---|
[287] | 8 |
|
---|
[288] | 9 | public class SimpleBuyer extends Agent
|
---|
[287] | 10 | {
|
---|
[309] | 11 | public SimpleBuyer(String name, UtilityFunction u, NegotiationContext nc, BlockingQueue<Offer> in,
|
---|
[287] | 12 | BlockingQueue<Offer> out, BlockingQueue<CoordinationMessage> cin,
|
---|
| 13 | BlockingQueue<NegotiationStatusMessage> cout) {
|
---|
[309] | 14 | super(name, u, nc, in, out, cin, cout);
|
---|
[287] | 15 | }
|
---|
| 16 |
|
---|
| 17 | @Override
|
---|
| 18 | protected void receiveOffer(Offer bundle)
|
---|
| 19 | {
|
---|
| 20 | // TODO Auto-generated method stub
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | @Override
|
---|
| 24 | protected Offer sendOffer()
|
---|
| 25 | {
|
---|
| 26 | Offer sampleOffer = Offer.getSampleOffer(k);
|
---|
| 27 | return sampleOffer;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | @Override
|
---|
| 31 | protected Offer sendOpeningOffer()
|
---|
| 32 | {
|
---|
| 33 | Offer sampleOffer = Offer.getSampleOffer(0);
|
---|
| 34 | return sampleOffer;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | @Override
|
---|
| 38 | protected void receiveCoordinationMessage(CoordinationMessage cpoll)
|
---|
| 39 | {
|
---|
| 40 | // Update the utility function
|
---|
| 41 | u = cpoll.f;
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.