public override int GetHashCode() { unchecked { int hashCode = Name?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (int)Type; hashCode = (hashCode * 397) ^ (int)Handedness; hashCode = (hashCode * 397) ^ (int)Target; hashCode = (hashCode * 397) ^ LevelRequirement; hashCode = (hashCode * 397) ^ FindRequirement; hashCode = (hashCode * 397) ^ FindOptimum; hashCode = (hashCode * 397) ^ UsageOptimum; hashCode = (hashCode * 397) ^ Armor; hashCode = (hashCode * 397) ^ Damage; hashCode = (hashCode * 397) ^ Value; hashCode = (hashCode * 397) ^ HP; hashCode = (hashCode * 397) ^ MP; hashCode = (hashCode * 397) ^ Poo; hashCode = (hashCode * 397) ^ Pee; hashCode = (hashCode * 397) ^ Command.GetHashCode(); hashCode = (hashCode * 397) ^ CommandMessage.GetHashCode(); hashCode = (hashCode * 397) ^ CriticalAdjective.GetHashCode(); hashCode = (hashCode * 397) ^ Countable.GetHashCode(); hashCode = (hashCode * 397) ^ IsFluid.GetHashCode(); return(hashCode); } }
public static void count(Countable c, int maxCount) { for (int i = 0; i < maxCount; i++) { c.incrementCount(); Console.WriteLine(c.getCountString() + " " + c.GetType().ToString().Split('.')[1]); } }
public static void AddComponents(Entity subject) { ItemBase.AddComponents(subject); // Item stuff Equippable.AddTo(subject, null); Countable.AddTo(subject); }
public void HashesShouldNotCollideTest() { var r1 = Countable.NewFullCVectorResultant(7, 9, 7, 14, 0, 0, 0); var r2 = Countable.NewFullCVectorResultant(3, 9, 7, 14, 0, 0, 0); var lsh1 = LSHCalc.h7(r1); var lsh2 = LSHCalc.h7(r2); Assert.AreNotEqual(lsh1, lsh2); }
//include static method that lets you count any Countable objects for a specific number of times. public static void CountTill(Countable c, int MaxCount) { for (int i = 0; i < MaxCount; i++) { c.IncrementCount(); Console.WriteLine(c.GetCountString()); } c.ResetCount(); Console.WriteLine("\n"); }
public static void count(Countable c, int maxCount) { for (int i = 0; i < maxCount; i++) { c.incrementCount(); c.getCount(); Console.WriteLine(c.getCountString()); } }
public static void count(Countable NumCount, int topNum) { for (int i = 0; i < topNum; i++) { NumCount.incementCount(); NumCount.getCount(); Console.WriteLine(NumCount.getCountString()); } }
private static void RunSolution1() { PrintHeader("Solution 1"); var obj1 = new ACountableClass(); var obj2 = new ACountableClass(); var obj3 = new ASecondCountableClass(); obj3.Dispose(); var output = Countable.PrintInstancesCount(); Console.Write(output); }
public static Countable CountableParse(XmlNode xmlNode) { if (xmlNode == null) { return(null); } if (xmlNode["Countable"] == null) { return(null); } Countable countable = new Countable(); countable.Min = IntParse(xmlNode["Min"]); countable.Max = IntParse(xmlNode["Max"]); countable.Value = IntParse(xmlNode["Value"]); countable.ExportToUnitSize = BoolParse(xmlNode["ExportToUnitSize"]); countable.ExportToWizardLevel = BoolParse(xmlNode["ExportToWizardLevel"]); if (xmlNode["MaxDependency"] != null) { if (xmlNode["MaxDependency"].Attributes["Dependency"] != null) { countable.Dependency = xmlNode["MaxDependency"].Attributes["Dependency"].InnerText; } if (xmlNode["MaxDependency"].Attributes["Ratio"] != null) { bool success = Double.TryParse(xmlNode["MaxDependency"].Attributes["Ratio"].InnerText, out double value); countable.Ratio = (success ? value : 0); } } return(countable); }
public static void count(Countable c, int maxCount) { }
public Complex(Countable c, SimpleFactory simpleFactory) { }