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
Line 
1package onetomany.bargainingchipsgame.players;
2
3import java.util.concurrent.BlockingQueue;
4
5import onetomany.bargainingchipsgame.NegotiationContext;
6import onetomany.bargainingchipsgame.interactions.Offer;
7import onetomany.bargainingchipsgame.players.utilityfunction.UtilityFunction;
8
9public class SimpleBuyer extends Agent
10{
11 public SimpleBuyer(String name, UtilityFunction u, NegotiationContext nc, BlockingQueue<Offer> in,
12 BlockingQueue<Offer> out, BlockingQueue<CoordinationMessage> cin,
13 BlockingQueue<NegotiationStatusMessage> cout) {
14 super(name, u, nc, in, out, cin, cout);
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.