source: src/main/java/onetomany/bargainingchipsgame/players/SimpleBuyer.java@ 310

Last change on this file since 310 was 309, checked in by Tim Baarslag, 5 years ago

General NegotiationContext

File size: 1.1 KB
RevLine 
[287]1package onetomany.bargainingchipsgame.players;
2
3import java.util.concurrent.BlockingQueue;
4
[309]5import onetomany.bargainingchipsgame.NegotiationContext;
[287]6import onetomany.bargainingchipsgame.interactions.Offer;
[288]7import onetomany.bargainingchipsgame.players.utilityfunction.UtilityFunction;
[287]8
[288]9public 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.