Skip to content
Snippets Groups Projects
Commit 084946be authored by Alex's avatar Alex
Browse files

fixed makeOffer reject problem

parent 69e84207
Branches
No related tags found
No related merge requests found
......@@ -384,8 +384,9 @@ class AgentBehaviour(variable: Variable,
stay using mind
// When it receives an offer it does NOTHING
case Event(MakeOffer(_), mind) =>
case Event(MakeOffer(someOffer), mind) =>
if (debug) println(s"$variable in $stateName has received MakeOffer")
sender ! Reject(someOffer)
stay using mind
//when it receives a neighbour's delta and the neighbourDeltas is partial
......@@ -422,8 +423,9 @@ class AgentBehaviour(variable: Variable,
stay using mind
// When it receives an offer it does NOTHING
case Event(MakeOffer(_), mind) =>
case Event(MakeOffer(someOffer), mind) =>
if (debug) println(s"$variable in $stateName has received MakeOffer and ignores it")
sender ! Reject(someOffer)
stay using mind
// When it receives a neighbour's delta and the neighbourDeltas is partial
......@@ -505,7 +507,7 @@ class AgentBehaviour(variable: Variable,
// When its partner tells it to go
case Event(GiveGo(_), mind) =>
if (debug) println(s"$variable in $stateName has received GiveGo and stahes it")
if (debug) println(s"$variable in $stateName has received GiveGo and stashes it")
stash
stay using mind
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment