static void Main(string[] args) { const string SPECIAL = "!@#$%&*"; int sum1 = 0, sum2 = 0; string ans = "Weak"; string words = Console.ReadLine().Trim(); if (words.Length >= 7) { foreach (char c in words) { if (Char.IsNumber(c)) { sum1++; } if (SPECIAL.Contains(c)) { sum2++; } } Console.WriteLine(sum1 + ",," + sum2); ans = (sum1 >= 2 && sum2 >= 2) ? "Strong" : "Weak"; } Console.WriteLine(ans); }
public bool IsGreaterThanOrEqualTo(SPECIAL special2) { foreach (var property in typeof(SPECIAL).GetProperties()) { if ((byte)property.GetValue(this) < (byte)property.GetValue(special2)) { return(false); } } return(true); }
// Public methods public void clicked() { if (clickable == true) { clickable = false; activated = true; combo.increment_combo(); set_clicked(true); special = SPECIAL.NONE; game_manager.operate(index, value); } }
public void setScore(int level, SPECIAL score, DISPLAYER theDisplay) { // print("score : " + score + " to " + theDisplay.ToString() + " in level " + level); string symbole = ""; if (score == SPECIAL.SPAR) { symbole = "/"; } else if (score == SPECIAL.STRIKE) { symbole = "X"; } else if (score == SPECIAL.NONE) { symbole = " "; } if (level >= 1 && level <= 10) { if (theDisplay == DISPLAYER.FIRST_SHOT) { allDisplayer[level - 1].first.text = symbole; } else if (theDisplay == DISPLAYER.SECOND_SHOT) { allDisplayer[level - 1].second.text = symbole; } else if (theDisplay == DISPLAYER.SUBTOTAL) { allDisplayer[level - 1].total.text = symbole; } else if (theDisplay == DISPLAYER.THIRD_SHOT) { thirdShot.text = symbole; } else if (theDisplay == DISPLAYER.TOTAL) { totalText.text = symbole; } } }