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

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

General NegotiationContext

File size: 1.2 KB
Line 
1package onetomany.bargainingchipsgame.players;
2
3import java.util.concurrent.BlockingQueue;
4import java.util.concurrent.LinkedBlockingQueue;
5
6import onetomany.bargainingchipsgame.NegotiationContext;
7import onetomany.bargainingchipsgame.interactions.Offer;
8import onetomany.bargainingchipsgame.players.utilityfunction.UtilityFunction;
9
10public class SimpleSeller extends Agent
11{
12 /**
13 * Dummy coordinator queues are created but are never attached
14 */
15 public SimpleSeller(String name, UtilityFunction u, NegotiationContext nc,
16 BlockingQueue<Offer> in, BlockingQueue<Offer> out)
17 {
18 super(name, u, nc, in, out,
19 new LinkedBlockingQueue<CoordinationMessage>(),
20 new LinkedBlockingQueue<NegotiationStatusMessage>());
21 }
22
23 @Override
24 protected void receiveOffer(Offer bundle)
25 {
26 // TODO Auto-generated method stub
27 }
28
29 @Override
30 protected Offer sendOffer()
31 {
32 Offer sampleOffer = Offer.getSampleOffer("Green", k);
33 return sampleOffer;
34 }
35
36 @Override
37 protected Offer sendOpeningOffer()
38 {
39 // The buyer should start
40 return null;
41 }
42
43 @Override
44 protected void receiveCoordinationMessage(CoordinationMessage cpoll)
45 {
46 }
47
48}
Note: See TracBrowser for help on using the repository browser.