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