source: src/main/java/onetomany/bargainingchipsgame/players/BilateralAgent.java@ 280

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

BlockingQueue<CoordinationMessage> and BlockingQueue<NegotiationStatusMessage>

File size: 740 bytes
Line 
1package onetomany.bargainingchipsgame.players;
2
3import java.util.concurrent.BlockingQueue;
4
5import onetomany.bargainingchipsgame.interactions.Offer;
6
7public abstract class BilateralAgent implements Runnable
8{
9 String name;
10 // Messaging from and to the opponent
11 protected BlockingQueue<Offer> in;
12 protected BlockingQueue<Offer> out;
13
14 protected abstract void receiveOffer(Offer bundle);
15
16 protected abstract Offer sendOffer();
17
18 protected abstract Offer sendOpeningOffer();
19
20 public BilateralAgent(String name, BlockingQueue<Offer> in, BlockingQueue<Offer> out)
21 {
22 super();
23 this.name = name;
24 this.in = in;
25 this.out = out;
26 }
27
28 @Override
29 public String toString()
30 {
31 return name;
32 }
33
34}
Note: See TracBrowser for help on using the repository browser.