public void OnGotJeton(MeikoMessage m) { if (etati == SiteEtat.Demandeur) { jetonDispi = true; } else { SendJetonToTheNextSite(); } }
public void OnGotJeton(MeikoMessage m) { jeton = (int[])m["Jeton"]; jetonDispi = true; // ∀ j : nbreqi[j] := max(nbreqi[j], jeton[j]) foreach (var k in Ri) { nbreqi[k] = Math.Max(nbreqi[k], jeton[k]); } // TODO/FIXME: Mine as well? I believe not nbreqi[i] = Math.Max(nbreqi[i], jeton[i]); }
public void OnGotRequest(MeikoMessage m) { var j = m.Src; var nj = (int)m["n"]; nbreqi[j] = Math.Max(nbreqi[j], nj); if (jetonDispi && etati == SiteEtat.Dehors && (nbreqi[j] > jeton[j])) { jetonDispi = false; SendMessage(new MeikoMessage { Type = "Jeton", ["Jeton"] = jeton, Dst = j, }); } }
public void OnGotJeton(MeikoMessage m) { jeton = (int[])m["Jeton"]; jetonDispi = true; }