Skip to content

Commit

Permalink
Fixed garbage quest validator.
Browse files Browse the repository at this point in the history
  • Loading branch information
PathogenDavid committed Sep 22, 2024
1 parent 78ead24 commit 0e9ca84
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public sealed class GarbageQuestValidator : QuestValidatorBase
public sealed class GarbageQuestValidator : QuestValidatorBase
{
public override PuzzleOutcome CheckPuzzle(Quest quest)
{
Expand Down Expand Up @@ -39,9 +39,9 @@ public override PuzzleOutcome CheckPuzzle(Quest quest)
}

// At this point we know if the trash is in a straight non-diagonal line, but we also need to reject trash lines which are not against the edge of the nest
if (commonX != 0 || commonX != quest.BoardWidth - 1)
if (commonX != 0 && commonX != quest.BoardWidth - 1)
commonX = invalid;
if (commonY != 0 || commonY != quest.BoardHeight - 1)
if (commonY != 0 && commonY != quest.BoardHeight - 1)
commonY = invalid;

if (itemCount < 3)
Expand Down

0 comments on commit 0e9ca84

Please sign in to comment.