package onetomany.bargainingchipsgame; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import onetomany.bargainingchipsgame.interactions.Offer; import onetomany.bargainingchipsgame.interactions.SampleOffer; import onetomany.bargainingchipsgame.players.BilateralAgent; /** * This package describes all the fundamental concepts in Bargaining Chips Game (BCG). * * BCG rules are based on a non-alternating offer protocol in each bilateral negotiation thread. * Multiple deals via simultaneous threads in the BCG one-to-many negotiation need to be coordinated. * So the players are equipped with two modules, one coordinator and multiple negotiators one per each thread. * */ public class BargainingChips { public static void main(String[] args) throws InterruptedException { BlockingQueue in = new LinkedBlockingQueue(); BlockingQueue out = new LinkedBlockingQueue(); BilateralAgent a = new BilateralAgent(in, out); Thread thread = new Thread(a); thread.start(); in.add(new SampleOffer(3)); Thread.sleep(5000); in.add(new SampleOffer(4)); } }