public void PitTrapTest() { DiceCup.SetRandom(new Random(400)); var architect = new TrapArchitect(); var traps = new List <Trap>(); var floodAreaKey = 36; // Flood area uses the pit trap subtable var pitTrapOpenKey = 89; var pitTrapTumbleKey = 94; var iterator = 33; for (int i = 0; i < iterator; i++) { var floodTrapBase = architect.GetTrapBaseFactory(); var floodTrapEffect = architect.GetSpecificTrapEffect(floodAreaKey); var floodTrapDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(floodTrapBase, floodTrapEffect, floodTrapDamage)); var pitTrapOpenBase = architect.GetTrapBaseFactory(); var pitTrapOpenEffect = architect.GetSpecificTrapEffect(pitTrapOpenKey); var pitTrapOpenDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(pitTrapOpenBase, pitTrapOpenEffect, pitTrapOpenDamage)); var pitTrapTumbleBase = architect.GetTrapBaseFactory(); var pitTrapTumbleEffect = architect.GetSpecificTrapEffect(pitTrapTumbleKey); var pitTrapTumbleDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(pitTrapTumbleBase, pitTrapTumbleEffect, pitTrapTumbleDamage)); } Approvals.VerifyAll(traps, "Pit Trap!"); }
public void SpeceficTrapTest() { DiceCup.SetRandom(new Random(4)); var architect = new TrapArchitect(); var trapBase = architect.GetSpecificTrapBase(15); var trapEffect = architect.GetSpecificTrapEffect(33); var trapDamage = architect.GetSpecificTrapDamage(8); var trap = new Trap(trapBase, trapEffect, trapDamage); Approvals.Verify(trap); }
public void AddNotesToTrap() { DiceCup.SetRandom(new Random(700)); var architect = new TrapArchitect(); var trapBase = architect.GetTrapBaseFactory(); var trapEffect = architect.GetTrapEffectFactory(); var trapDamage = architect.GetTrapDamageFactory(); var trap = new Trap(trapBase, trapEffect, trapDamage); trap.AddNotes("This trap is a test of the note application system."); Approvals.Verify(trap); }
public void TrapObjectTest() { DiceCup.SetRandom(new Random(300)); var architect = new TrapArchitect(); var traps = new List <Trap>(); var iterator = 100; for (int i = 0; i < iterator; i++) { traps.Add(architect.GetTrap()); } Approvals.VerifyAll(traps, "Trap"); }
public void RandomFactoryTest() { DiceCup.SetRandom(new Random(100)); var architect = new TrapArchitect(); var effectList = new List <string>(); int repeat = 100; for (int i = 0; i < repeat; i++) { effectList.Add(architect.GetTrapEffectFactory()); } Approvals.VerifyAll(effectList, "Traps"); }
public void NestedRollTrapsTest() { DiceCup.SetRandom(new Random(600)); var architect = new TrapArchitect(); var traps = new List <Trap>(); var riddleTrapKey = 5; var lockEntranceKey = 46; var lockExitKey = 47; var rollTwiceKey = 99; var rollThriceKey = 100; var iterator = 20; for (int i = 0; i < iterator; i++) { var riddleTrapBase = architect.GetTrapBaseFactory(); var riddleTrapEffect = architect.GetSpecificTrapEffect(riddleTrapKey); var riddleTrapDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(riddleTrapBase, riddleTrapEffect, riddleTrapDamage)); var lockEntranceBase = architect.GetTrapBaseFactory(); var lockEntranceEffect = architect.GetSpecificTrapEffect(lockEntranceKey); var lockEntranceDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(lockEntranceBase, lockEntranceEffect, lockEntranceDamage)); var lockExitBase = architect.GetTrapBaseFactory(); var lockExitEffect = architect.GetSpecificTrapEffect(lockExitKey); var lockExitDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(lockExitBase, lockExitEffect, lockExitDamage)); var rollTwiceBase = architect.GetTrapBaseFactory(); var rollTwiceEffect = architect.GetSpecificTrapEffect(rollTwiceKey); var rollTwiceDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(rollTwiceBase, rollTwiceEffect, rollTwiceDamage)); var rollThriceBase = architect.GetTrapBaseFactory(); var rollThriceEffect = architect.GetSpecificTrapEffect(rollThriceKey); var rollThriceDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(rollThriceBase, rollThriceEffect, rollThriceDamage)); } Approvals.VerifyAll(traps, "Nested Trap!"); }
public static int Main() { var blah = new TrapArchitect(); List <string> trappedObjects = new List <string>(); trappedObjects = TrapBasicsTable10a.GetObjectTrappedList(); List <string> trapTraits = new List <string>(); trapTraits = TrapEffectsTable10b.EffectsOfTrap(); int objectIndex = 0; int effectIndex = 0; Console.Title = "Trap Architect"; Console.WindowHeight = Console.LargestWindowHeight; Console.WindowWidth = Console.LargestWindowWidth; Console.WriteLine("Please select an object to be trapped (Roll Percentile dice for randomization)"); for (int trap = 1; (trap - 1) < trappedObjects.Count; trap++) { Console.WriteLine(trap.ToString() + " - {0}", trappedObjects[(trap - 1)]); } Console.WriteLine(); Console.WriteLine("Your choice: "); objectIndex = int.Parse(Console.ReadLine()); Console.Clear(); Console.WriteLine("Please select a trap effect (Roll Percentile dice for randomization)"); for (int effect = 1; (effect - 1) < trapTraits.Count; effect++) { Console.WriteLine(effect.ToString() + " - {0}", trapTraits[effect - 1]); } Console.WriteLine("Your choice: "); effectIndex = int.Parse(Console.ReadLine()); Console.Clear(); Console.WriteLine("Your trap is:"); Console.WriteLine("{0} {1}", trappedObjects[objectIndex - 1], trapTraits[effectIndex - 1]); Console.ReadKey(); return(0); }
public void RandomTrapConstructionTest() { DiceCup.SetRandom(new Random(200)); var architect = new TrapArchitect(); var traps = new List <string>(); var iterator = 100; for (int i = 0; i < iterator; i++) { var sb = new StringBuilder(); sb.AppendLine(architect.GetTrapBaseFactory()); sb.AppendLine(architect.GetTrapEffectFactory()); sb.AppendLine(architect.GetTrapDamageFactory()); traps.Add(sb.ToString()); } Approvals.VerifyAll(traps, "Traps"); }
public void GasTrapTest() { DiceCup.SetRandom(new Random(500)); var architect = new TrapArchitect(); var traps = new List <Trap>(); var gasTrapKey = 38; var iterator = 100; for (int i = 0; i < iterator; i++) { var gasTrapBase = architect.GetTrapBaseFactory(); var gasTrapEffect = architect.GetSpecificTrapEffect(gasTrapKey); var gasTrapDamage = architect.GetTrapDamageFactory(); traps.Add(new Trap(gasTrapBase, gasTrapEffect, gasTrapDamage)); } Approvals.VerifyAll(traps, "Gas Trap!"); }
public static int Main() { var blah = new TrapArchitect(); List<string> trappedObjects = new List<string>(); trappedObjects = TrapBasicsTable10a.GetObjectTrappedList(); List<string> trapTraits = new List<string>(); trapTraits = TrapEffectsTable10b.EffectsOfTrap(); int objectIndex = 0; int effectIndex = 0; Console.Title = "Trap Architect"; Console.WindowHeight = Console.LargestWindowHeight; Console.WindowWidth = Console.LargestWindowWidth; Console.WriteLine("Please select an object to be trapped (Roll Percentile dice for randomization)"); for (int trap = 1; (trap - 1) < trappedObjects.Count; trap++) { Console.WriteLine(trap.ToString() + " - {0}", trappedObjects[(trap - 1)]); } Console.WriteLine(); Console.WriteLine("Your choice: "); objectIndex = int.Parse(Console.ReadLine()); Console.Clear(); Console.WriteLine("Please select a trap effect (Roll Percentile dice for randomization)"); for (int effect = 1; (effect - 1) < trapTraits.Count; effect++) { Console.WriteLine(effect.ToString() + " - {0}", trapTraits[effect - 1]); } Console.WriteLine("Your choice: "); effectIndex = int.Parse(Console.ReadLine()); Console.Clear(); Console.WriteLine("Your trap is:"); Console.WriteLine("{0} {1}", trappedObjects[objectIndex - 1], trapTraits[effectIndex - 1]); Console.ReadKey(); return 0; }
public TrapArchitectModel() { trapArchitect = new TrapArchitect(); }