Commit e3fc8690 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Fix drawing of first edge on 3-edge connections.

parent d4a9594d
......@@ -1215,7 +1215,7 @@ int Board::findPath(TilePos const & tilePos1, TilePos const & tilePos2, Possible
int tempY = tilePos1.y() + dy.at(i);
while (isValidPosWithOutline(TilePos(tempX, tempY)) && field(TilePos(tempX, tempY)) == EMPTY) {
if ((simplePath = findSimplePath(TilePos(tempX, tempY), tilePos2, possibleMoves)) > 0) {
possibleMoves.back().path().prepend(tilePos1);
possibleMoves.back().prependTile(tilePos1);
numberOfPaths += simplePath;
}
tempX += dx.at(i);
......
......@@ -96,6 +96,10 @@ Path PossibleMove::slide() const
{
return m_slide;
}
void PossibleMove::prependTile(TilePos const tilePos)
{
m_path.prepend(tilePos);
}
}
// vim: expandtab:tabstop=4:shiftwidth=4
......
......@@ -44,6 +44,7 @@ public:
Path path() const;
bool hasSlide() const;
Path slide() const;
void prependTile(TilePos const tilePos);
private:
Path m_path; ///< path used to connect the two tiles
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment