private bool WhoGun(ResponseType response, ResponseType responseRigth, TheoryService theoryService, Witness witness, Theory theory) { if (response == responseRigth) { Theory newTheory = theoryService.NextTheory(true, true, false); ResponseType newResponse = witness.Reply(newTheory); if (WhoGun(newResponse, response, theoryService, witness, theory)) theory.Gun = newTheory.Gun; return false; } return true; }
public bool WhoSuspect(ResponseType response, ResponseType responseRigth, TheoryService theoryService, Witness witness, Theory theory) { if (response == responseRigth) { Theory newTheory = theoryService.NextTheory(false, true, true); ResponseType newResponse = witness.Reply(newTheory); if (WhoSuspect(newResponse, response, theoryService, witness, theory)) theory.Suspect = newTheory.Suspect; return false; } return true; }