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

update handling messages delta

parent 5ca4f8f4
Branches
No related tags found
No related merge requests found
......@@ -73,6 +73,11 @@ class AgentBehaviour(variable: Variable,
stay using mind
}
case Event(Reject(_), mind) => {
if (debug) println(s"$variable in $stateName has received Reject and ignores it")
stay using mind
}
case Event(InformDelta(_), mind) => {
if (debug) println(s"$variable in $stateName has received InformDelta and stashed it")
stash
......@@ -253,6 +258,12 @@ class AgentBehaviour(variable: Variable,
*/
when(ReceiverWaitingValues) {
case Event(InformDelta(_), mind) => {
if (debug) println(s"$variable in $stateName has received InformDelta and stashes it")
stash
stay using mind
}
// When it receives a reject it does NOTHING
case Event(Reject(_), mind) =>
if (debug) println(s"$variable in $stateName has received Reject and ignores it")
......@@ -365,7 +376,7 @@ class AgentBehaviour(variable: Variable,
when(Committed) {
//when it receives its partner's giveGo
case Event(GiveGo, mind) => {
case Event(GiveGo(_), mind) => {
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