public void SimpleTwoLaneRowTest()
    {
        var cellOne = "RcWWrwWW";
        var cellTwo = "RcWWrwWW";

        var level = new List <string> {
            cellOne, cellTwo
        };
        var lpm = LevelPlayModelFactory.Create(level, 1, 2);

        lpm.LockRows(0, 1);

        Assert.IsTrue(lpm.CurrentState == LevelPlayState.Unstarted);

        lpm.MakeAMove(new Move(0, 1, MoveInput.SwipeRight));

        Assert.IsTrue(lpm.CurrentState == LevelPlayState.Won);
    }
    public void SimpleTest()
    {
        var data  = "RcwrBGoy";
        var level = new List <string> {
            data
        };
        var levelPlayModel = LevelPlayModelFactory.Create(level, 1, 1);

        Assert.IsTrue(levelPlayModel.CurrentState == LevelPlayState.Unstarted);
        Assert.IsFalse(levelPlayModel.CellCorrect(0, 0));

        levelPlayModel.MakeAMove(new Move(0, 0, MoveInput.SwipeRight));

        Assert.IsTrue(levelPlayModel.CurrentState == LevelPlayState.Ongoing);
        Assert.IsFalse(levelPlayModel.CellCorrect(0, 0));

        levelPlayModel.MakeAMove(new Move(0, 0, MoveInput.SwipeRight));

        Assert.IsTrue(levelPlayModel.CellCorrect(0, 0));
        Assert.IsTrue(levelPlayModel.CurrentState == LevelPlayState.Won);
    }
    public void Locked2x2Test()
    {
        var cellOne   = "RcWWrwWW";
        var cellTwo   = "RcWWrwWW";
        var cellThree = "RcWWrwWW";
        var cellFour  = "RcWWrwWW";

        var level = new List <string> {
            cellOne, cellTwo, cellThree, cellFour
        };
        var lpm = LevelPlayModelFactory.Create(level, 2, 2);

        lpm.LockRows(0, 1);
        lpm.LockColumns(0, 1);

        Assert.IsTrue(lpm.CurrentState == LevelPlayState.Unstarted);

        lpm.MakeAMove(new Move(0, 1, MoveInput.SwipeRight));

        Assert.IsTrue(lpm.CurrentState == LevelPlayState.Won);
    }
    public void DoubleTest()
    {
        var cellOne = "RcwrBGoy";
        var cellTwo = "RcrwBGoy";

        var level = new List <string> {
            cellOne, cellTwo
        };
        var lpm = LevelPlayModelFactory.Create(level, 2, 1);

        Assert.IsTrue(lpm.CurrentState == LevelPlayState.Unstarted);

        lpm.MakeAMove(new Move(0, 0, MoveInput.SwipeRight));
        lpm.MakeAMove(new Move(0, 0, MoveInput.SwipeRight));

        Assert.IsTrue(lpm.CurrentState == LevelPlayState.Ongoing);

        lpm.MakeAMove(new Move(1, 0, MoveInput.SwipeUp));
        lpm.MakeAMove(new Move(1, 0, MoveInput.SwipeUp));

        Assert.IsTrue(lpm.CurrentState == LevelPlayState.Won);
    }
    public void CreateEmptyLevelPlayModelTest()
    {
        var model = LevelPlayModelFactory.Create();

        Assert.IsTrue(model != null && model.CurrentState == LevelPlayState.Unstarted);
    }