From c68ac871c73ff4c76246fc49465f53f8befef92f Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sun, 23 Jul 2023 09:40:06 -0500 Subject: Fix bug which could pass phony words. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported to me by John Chew, if you… * Made a vertical play * …through an existing tile * …which makes horizontal words below the existing tile * …and one of the horizontal words is phony Then the phony is not detected. The logic for horizontal plays was correct…an easy-to-overlook mistake existed in the parallel logic for vertical plays. --- board.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board.cpp') diff --git a/board.cpp b/board.cpp index 6d3f615..c295c12 100644 --- a/board.cpp +++ b/board.cpp @@ -300,8 +300,8 @@ MoveList Board::allWordsFormedBy(const Move &move) const { ret.push_back(Move::createPlaceMove((i + move.startrow), startColumn, /* horizontal */ true, word)); } - i++; } + i++; } } } -- cgit v1.2.3