public void RunTests() { MedalTable medal = new MedalTable(); Assert.AreEqual(new string[] { "KOR 3 1 0", "ITA 1 0 0", "TPE 0 1 1", "CHN 0 1 0", "JPN 0 1 0", "AUS 0 0 1", "GBR 0 0 1", "UKR 0 0 1" }, medal.generate(new string[] { "ITA JPN AUS", "KOR TPE UKR", "KOR KOR GBR", "KOR CHN TPE" })); Assert.AreEqual(new string[] { "USA 1 0 0", "AUT 0 1 0", "ROM 0 0 1" }, medal.generate(new string[] { "USA AUT ROM" })); Assert.AreEqual(new string[] { "AUT 1 1 1", "GER 1 1 1", "SUI 1 1 1" }, medal.generate(new string[] { "GER AUT SUI", "AUT SUI GER", "SUI GER AUT" })); }
public ItemDB GetOption() { ItemDB option = new ItemDB(); int atk = 0; double hp = 0.0; double damage = 0.0; for (int i = 0; i < List[(int)MEDAL_ENUM.VALOR]; i++) { atk += MedalTable.Get_ATK_MATK(i); } option.Option_ITYPE[Enum.GetName(typeof(ITYPE), ITYPE.ATK)] = atk; option.Option_ITYPE[Enum.GetName(typeof(ITYPE), ITYPE.MATK)] = atk; for (int i = 0; i <= List[(int)MEDAL_ENUM.GUARDIAN]; i++) { hp += MedalTable.Get_MaxHP(i); damage += MedalTable.Get_P_M_Damage(i); } option.Option_ITYPE[Enum.GetName(typeof(ITYPE), ITYPE.HP)] = (int)hp; option.Option_DTYPE[Enum.GetName(typeof(DTYPE), DTYPE.PHYSICAL_DAMAGE)] = damage; hp = 0; damage = 0.0; for (int i = 0; i <= List[(int)MEDAL_ENUM.WISDOM]; i++) { hp += MedalTable.Get_MaxHP(i); damage += MedalTable.Get_P_M_Damage(i); } option.Option_ITYPE[Enum.GetName(typeof(ITYPE), ITYPE.HP)] += (int)hp; option.Option_DTYPE[Enum.GetName(typeof(DTYPE), DTYPE.MAGICAL_DAMAGE)] = damage; damage = 0.0; for (int i = 0; i <= List[(int)MEDAL_ENUM.CHARM]; i++) { damage += MedalTable.Get_Dec_Damage(i); } option.Option_DTYPE[Enum.GetName(typeof(DTYPE), DTYPE.PHYSICAL_DEC_DAMAGE)] = damage; damage = 0.0; for (int i = 0; i <= List[(int)MEDAL_ENUM.GALE]; i++) { damage += MedalTable.Get_Dec_Damage(i); } option.Option_DTYPE[Enum.GetName(typeof(DTYPE), DTYPE.MAGICAL_DEC_DAMAGE)] = damage; return(option); }