public Fact(TimelineSlot ts, SuspectEnum p, WpnEnum w, bool use) { info = ts; person = p; weapon = w; used = use; }
private double startTime; //normalized. eg. 1.5 means 1.30am, 14.25 means 2.15pm, etc #endregion Fields #region Constructors //public readonly SuspectEnum person; //probably not needed as its stored in person alr public TimelineSlot(double start, RmEnum p, string a, WpnEnum wpn/*, SuspectEnum s*/) { startTime = start; endTime = start + 1; place = p; activity = a; weapon = wpn; // person = s; }
public void setFakeDuringMurder(double start, RmEnum p, string activity, WpnEnum w) { falseTimeline.Insert(1, new TimelineSlot(start, p, activity, w)); }
public void setBeforeMurder(double start, RmEnum p, string activity, WpnEnum w) { truthTimeline.Insert(0, new TimelineSlot(start, p, activity, w)); }
private static void placeWeapon(WpnEnum w, RmEnum r) { switch (w) { case WpnEnum.Knife: knifeLoc = r; break; case WpnEnum.Scissors: scissorsLoc = r; break; case WpnEnum.Screwdriver: screwdriverLoc = r; break; case WpnEnum.Spanner: spannerLoc = r; break; case WpnEnum.Towel: towelLoc = r; break; } }
// generate weapon different from that passed in private static WpnEnum genWeap(WpnEnum w) { WpnEnum temp; do { temp = (WpnEnum) rand.Next(0, Globals.numWeapons); } while(temp == w); return temp; }
void Start() { Debug.Log("WHY" + startMenuScript.diffLevel); difficulty = startMenuScript.diffLevel; initializeContradictionNum(); initializeWeaponLocations(); SuspectEnum murdererEnum = genMurderer(); murderWeap = genWeap(); deathTime = rand.Next(earliestDeath, latestDeath); bodyFound = deathTime+2;//genBodyFoundTime(); befMurderTime = deathTime-1; aftMurderTime = deathTime+1; victim = new Person(SuspectEnum.Father, true, false); murderer = new Person(murdererEnum, false, true); for (int i=0; i<Globals.numSuspects; i++) { if (i == (int)murdererEnum) timeline.Insert(i, murderer); else timeline.Insert(i, new Person((SuspectEnum)i, false, false)); } // RmEnum RHBefMurRoom; // RmEnum RHDurMurRoom; // RmEnum RHAftMurRoom; //victim was doing something int victimBefMurderRoom = rand.Next(0, Globals.numRooms); victim.setBeforeMurder(befMurderTime, (RmEnum)victimBefMurderRoom, Globals.room[victimBefMurderRoom].randomGA(), WpnEnum.None); //victim died int victimDurMurderRoom = rand.Next(0, Globals.numRooms); victim.setDuringMurder(deathTime, (RmEnum)victimDurMurderRoom, "dead", WpnEnum.None); //murderer's truth timeline timeline[(int)murdererEnum].setBeforeMurder(befMurderTime, Globals.randRoom((RmEnum)victimBefMurderRoom), "acquiring murder weapon", murderWeap); timeline[(int)murdererEnum].setDuringMurder(deathTime, (RmEnum)victimDurMurderRoom, "murder", murderWeap); //truth: murderer killed victim timeline[(int)murdererEnum].setAfterMurder(aftMurderTime, Globals.randRoom((RmEnum)victimDurMurderRoom), "disposing murder weapon", murderWeap); //murderer's lies timeline[(int)murdererEnum].setFakeBeforeMurder(befMurderTime, timeline[(int)murdererEnum].getBeforeMurderRoom(), Globals.room[(int)timeline[(int)murdererEnum].getBeforeMurderRoom()].WeaponList[(int)murderWeap].activity[0], murderWeap);//murderer lies about his befMurder activity RmEnum murdererDurMurLieRm = Globals.randRoom((RmEnum)victimDurMurderRoom); timeline[(int)murdererEnum].setFakeDuringMurder(deathTime, murdererDurMurLieRm, Globals.room[(int)murdererDurMurLieRm].WeaponList[(int)murderWeap].activity[0], murderWeap); //murderer lies about his DurMurder room and activity timeline[(int)murdererEnum].setFakeAfterMurder(aftMurderTime, timeline[(int)murdererEnum].getAfterMurderRoom(), Globals.room[(int)timeline[(int)murdererEnum].getAfterMurderRoom()].WeaponList[(int)murderWeap].activity[0], murderWeap); //murderer lies about his AftMurder activity timeline[(int)murdererEnum].setReturnLieBM(); timeline[(int)murdererEnum].setReturnLieDM(); timeline[(int)murdererEnum].setReturnLieAM(); //find body int finder = rand.Next(0, Globals.numSuspects); timeline[finder].setFoundBody(true); //last seen int lastSaw = rand.Next(0, Globals.numSuspects); timeline[lastSaw].setLastSaw(true); switch(difficulty) { case GameDiffEnum.Easy: GenerateEasyGame(murdererEnum, victimBefMurderRoom, victimDurMurderRoom); break; case GameDiffEnum.Medium: GenerateMediumGame(murdererEnum, victimBefMurderRoom, victimDurMurderRoom); break; case GameDiffEnum.Hard: GenerateMediumGame(murdererEnum, victimBefMurderRoom, victimDurMurderRoom); break; } showStain(victim.getDuringMurderRoom()); startPara = createStartPara(); //*********** Not working anymore, cause no more redherring //placeWeaponsInWorld(redHerringIndex, murderer); PrintMethod(); AI.tree = AI.qnGenerator(); }