Last change
on this file since 244 was 244, checked in by Faria Nassiri Mofakham, 5 years ago |
Sequence added to the Action parameters and some comments also added.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[244] | 1 | /**
|
---|
| 2 | * Action class
|
---|
| 3 | */
|
---|
| 4 | package onetomany.bargainingchipsgame.interactions;
|
---|
| 5 |
|
---|
| 6 | import onetomany.bargainingchipsgame.players.Agent;
|
---|
| 7 |
|
---|
| 8 | /**
|
---|
| 9 | * Offers are being exchanged in the forms of actions.
|
---|
| 10 | * Each action contains the offer as well as sender and receiver agents, and the sequence number of the action in the thread.
|
---|
| 11 | *
|
---|
| 12 | *
|
---|
| 13 | * @author Faria Nassiri-Mofakham
|
---|
| 14 | *
|
---|
| 15 | */
|
---|
| 16 | public class Action
|
---|
| 17 | {
|
---|
| 18 | private Offer offer;
|
---|
| 19 | private Agent sender;
|
---|
| 20 | private Agent receiver;
|
---|
| 21 | private long sequence;
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * @return the sequence
|
---|
| 26 | */
|
---|
| 27 | public long getSequence() {
|
---|
| 28 | return sequence;
|
---|
| 29 | }
|
---|
| 30 | /**
|
---|
| 31 | * @param sequence the sequence to set
|
---|
| 32 | */
|
---|
| 33 | public void setSequence(long sequence) {
|
---|
| 34 | this.sequence = sequence;
|
---|
| 35 | }
|
---|
| 36 | /**
|
---|
| 37 | * @return the offer
|
---|
| 38 | */
|
---|
| 39 | public Offer getOffer() {
|
---|
| 40 | return offer;
|
---|
| 41 | }
|
---|
| 42 | /**
|
---|
| 43 | * @param offer the offer to set
|
---|
| 44 | */
|
---|
| 45 | public void setOffer(Offer offer) {
|
---|
| 46 | this.offer = offer;
|
---|
| 47 | }
|
---|
| 48 | /**
|
---|
| 49 | * @return the sender
|
---|
| 50 | */
|
---|
| 51 | public Agent getSender() {
|
---|
| 52 | return sender;
|
---|
| 53 | }
|
---|
| 54 | /**
|
---|
| 55 | * @param sender the sender to set
|
---|
| 56 | */
|
---|
| 57 | public void setSender(Agent sender) {
|
---|
| 58 | this.sender = sender;
|
---|
| 59 | }
|
---|
| 60 | /**
|
---|
| 61 | * @return the receiver
|
---|
| 62 | */
|
---|
| 63 | public Agent getReceiver() {
|
---|
| 64 | return receiver;
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * @param receiver the receiver to set
|
---|
| 68 | */
|
---|
| 69 | public void setReceiver(Agent receiver) {
|
---|
| 70 | this.receiver = receiver;
|
---|
| 71 | }
|
---|
| 72 |
|
---|
| 73 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.