public void Constructor_Test() { string testString = "test"; CheckScore testCheckScore = new CheckScore(testString); Assert.AreEqual(testString, testCheckScore.GetUserInput()); }
private void Awake() { rectTransform = GetComponent <RectTransform>(); canvasGroup = GetComponent <CanvasGroup>(); CC = GetComponent <CheckScore>(); }
public void CalculateScore_TestSpecialChar() { string testString = "!test!"; CheckScore testCheckScore = new CheckScore(testString); testCheckScore.CalculateScore(); Assert.AreEqual(4, testCheckScore.GetUserScore()); }
public void CalculateScore_TestHigh() { string testString = "supercalifragilisticexpialidocious"; CheckScore testCheckScore = new CheckScore(testString); testCheckScore.CalculateScore(); Assert.AreEqual(56, testCheckScore.GetUserScore()); }
public void CalculateScore_TestMid() { string testString = "quartz"; CheckScore testCheckScore = new CheckScore(testString); testCheckScore.CalculateScore(); Assert.AreEqual(24, testCheckScore.GetUserScore()); }
public void CalculateScore_TestLow() { string testString = "test"; CheckScore testCheckScore = new CheckScore(testString); testCheckScore.CalculateScore(); Assert.AreEqual(4, testCheckScore.GetUserScore()); }
public static void Main() { Console.WriteLine("Enter a word to check its Scrabble score."); string userInput = Console.ReadLine(); CheckScore newCheckScore = new CheckScore(userInput); newCheckScore.CalculateScore(); int myScore = newCheckScore.GetUserScore(); Console.WriteLine("Your Scrabble score for the word " + newCheckScore.GetUserInput() + ": " + myScore + "!"); }
public ActionResult Create(string wordInput) { if (wordInput != null) { CheckScore newScore = new CheckScore(wordInput); newScore.CalculateScore(); List <CheckScore> allCheckScores = CheckScore.GetAll(); return(View("Index", allCheckScores)); } else { return(View("New")); } }
void Start() { scoreText = GetComponent <TextMeshProUGUI>(); toPlayParticle = FindObjectOfType <CheckScore>(); }
public ActionResult Index() { List <CheckScore> allCheckScores = CheckScore.GetAll(); return(View(allCheckScores)); }