daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using NUnit.Framework;
  2.  
  3. namespace GameTests
  4. {
  5.     [TestFixture]
  6.     public class ScorerTests
  7.     {
  8.         [Test]
  9.         public void GameTests()
  10.         {
  11.             var scorer = new Scorer();
  12.             int result;
  13.             scorer.c(new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, out result);
  14.             Assert.AreEqual(0, result);
  15.             scorer.c(new[] { 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, out result);
  16.             Assert.AreEqual(10, result);
  17.             scorer.c(new[] { 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, out result);
  18.             Assert.AreEqual(12, result);
  19.             scorer.c(new[] { 10, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, out result);
  20.             Assert.AreEqual(14, result);
  21.             scorer.c(new[] { 9, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, out result);
  22.             Assert.AreEqual(13, result);
  23.             scorer.c(new[] { 9, 1, 10, 0, 10, 0, 5, 4, 10, 0, 5, 4, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, out result);
  24.             Assert.AreEqual(109, result);
  25.             scorer.c(new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 10, 10 }, out result);
  26.             Assert.AreEqual(30, result);
  27.             scorer.c(new[] { 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 10 }, out result);
  28.             Assert.AreEqual(300, result);
  29.         }
  30.     }
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top