Skip to content

Non square puzzles sometimes crashes with an IndexOutOfRangeException #3

Description

@sonnemaf

If the puzzle is not square it sometimes crashes with an IndexOutOfRangeException.

Try this.

[Test]
public void CreateAndSolve()
{
    var pd = new WordSearchBuilder(20, 10)
    .WithWords("word1", "word2", "word3")
    .Build();

    var sol = new StandardWordSearchSolver();

    foreach (var word in pd.Solution)
    {
        var result = sol.SeekWord(pd.Puzzle, word.Word);
        result.First().Should().BeEquivalentTo(word);
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions