The code below is what I have gotten to so far but I am not able to access the ActionMaster class from the test script. All of the ActionMaster type thingy’s (what do you call those?) are giving me red squiggles. I tried fiddling with the folder location and a little bit of namespace stuff (though I don’t know too much about that). Help would be greatly appreciated!
using UnityEngine;
using UnityEngine.TestTools;
using NUnit.Framework;
using System.Collections;
public class ActionMasterTest {
private ActionMaster.Action endTurn = ActionMaster.Action.EndTurn;
[Test]
public void T00ActionMasterTestSimplePasses() {
Assert.AreEqual(1, 1);
}
[Test]
public void T01OneStrikeReturnsEndTurn()
{
Assert.AreEqual(endTurn, actionMaster.Bowl(10));
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ActionMaster : MonoBehaviour {
public enum Action { Tidy, Reset, EndTurn, EndGame};
public Action Bowl(int pins) {
if (pins == 10)
{
return Action.EndTurn;
}
return Action.EndGame;
}
}