Rev | Line | |
---|
[257] | 1 | /**
|
---|
| 2 | *
|
---|
| 3 | */
|
---|
| 4 | package onetomany;
|
---|
| 5 |
|
---|
| 6 | import onetomany.bargainingchipsgame.Bundle;
|
---|
| 7 | import onetomany.bargainingchipsgame.Chip;
|
---|
| 8 | import onetomany.bargainingchipsgame.Stack;
|
---|
| 9 | import onetomany.bargainingchipsgame.players.Agent;
|
---|
| 10 | import onetomany.bargainingchipsgame.players.utilityfunction.UF_75pQtyOrNothing;
|
---|
| 11 | import onetomany.bargainingchipsgame.players.utilityfunction.Utility_Function;
|
---|
| 12 |
|
---|
| 13 | /**
|
---|
| 14 | * @author Faria Nassiri-Mofakham
|
---|
| 15 | *
|
---|
| 16 | */
|
---|
| 17 | public class Buyer extends Thread
|
---|
| 18 | {
|
---|
| 19 |
|
---|
| 20 | public Buyer(String name, Bundle wishlist, Utility_Function u, long deadline, String picture)
|
---|
| 21 | {
|
---|
| 22 | super(name);
|
---|
| 23 | super.run();
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | public void run() {
|
---|
| 27 | // TODO Auto-generated method stub
|
---|
| 28 |
|
---|
| 29 | Bundle a=new Bundle();
|
---|
| 30 | a.addStack(new Stack(new Chip("Blue", 4), 30));
|
---|
| 31 | a.addStack(new Stack(new Chip("Orange", 6), 20));
|
---|
| 32 |
|
---|
| 33 | Runnable r = (Runnable) new Negotiator(new Agent("Bob",a, new UF_75pQtyOrNothing(a), 10, null));
|
---|
| 34 | new Thread(r).start();
|
---|
| 35 | System.out.println(r);
|
---|
[258] | 36 |
|
---|
| 37 |
|
---|
[257] | 38 | }
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.