Permalink
Browse files

This should pass

  • Loading branch information...
No3x committed Dec 5, 2018
1 parent 197eba8 commit 89d51b2472fdf8cf6800dfc87af5f5bbb4f208b6
Showing with 7 additions and 5 deletions.
  1. +3 −3 src/Game/PlayGround.h
  2. +4 −2 test/src/Game_tests.cpp
@@ -14,9 +14,9 @@ class PlayGround {
public:
PlayGround(DominoTreeStructureElement rootElement) : rootElement(rootElement) {}

void mountStone(DominoPiece stone){
rootElement.mount(DominoTreeStructureElement(stone));
};
DominoTreeStructureElement getRootElement() {
return rootElement;
}

void mountStone(DominoTreeStructureElement at, DominoPiece stone) {
at.mount(DominoTreeStructureElement(stone));
@@ -96,9 +96,11 @@ TEST_F(GameTest, twoStonesHave2MountPoints) {
DominoPiece piece2 = getDominoPieceWith(6, 6);

PlayGround playGround = PlayGround(piece);
const DominoTreeStructureElement &nextMountPoint = playGround.getAvailableMountPoints().front();
playGround.mountStone(nextMountPoint, piece2);
EXPECT_THAT(playGround.getAvailableMountPoints().size(), Eq(1));

DominoTreeStructureElement nextMountPoint = playGround.getAvailableMountPoints().front();
playGround.mountStone(nextMountPoint, piece2);
DominoTreeStructureElement rootElement = playGround.getRootElement();
EXPECT_THAT(playGround.getAvailableMountPoints().size(), Eq(2));
}

0 comments on commit 89d51b2

Please sign in to comment.