numl.Tests.AITests.Square.Test C# (CSharp) Method

Test() public static method

public static Test ( int idx, IAction action ) : bool
idx int
action IAction
return bool
        public static bool Test(int idx, IAction action)
        {
            if (action.Name == "Left" && idx % 3 != 0)
                return true;
            else if (action.Name == "Right" && (idx + 1) % 3 != 0)
                return true;
            else if (action.Name == "Up" && idx > 2)
                return true;
            else if (action.Name == "Down" && idx < 6)
                return true;
            else
                return false;
        }