// Use this for initialization
 void Start()
 {
     stats = new int[12];
     for (int i = 0; i < stats.Length; i++)
     {
         stats [i] = 0;
     }
     cp = GameObject.Find("PlayersManager").GetComponent <CreatePlayers> ();
 }
Esempio n. 2
0
        public void EnterNameOfPlayersTest_PlayersName()
        {
            // Arrange
            WriteClass    writer        = new WriteClass();
            FakeUserInput userInput     = new FakeUserInput();
            CreatePlayers createPlayers = new CreatePlayers(writer, userInput);

            //Act
            int expected = userInput.GetIntInput();
            var actual   = createPlayers.EnterNameOfPlayers(expected);

            //Assert
            Assert.IsTrue(actual.Count == expected);
        }
Esempio n. 3
0
        public void HowManyPlayers_PostiveNumber()
        {
            // Arrange
            WriteClass    writer       = new WriteClass();
            FakeUserInput userInput    = new FakeUserInput();
            CreatePlayers createPlayer = new CreatePlayers(writer, userInput);
            int           expected     = 3;

            // Act
            var actual = createPlayer.HowManyPlayers();

            // Assert
            Assert.AreEqual(expected, actual);
        }