Skip to content

Commit 6c697d0

Browse files
committed
Fixed constructor check in ResourceTile
1 parent 55867d1 commit 6c697d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GamePiece.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GamePiece::~GamePiece() {
1515
}
1616

1717
ResourceTile::ResourceTile(GameBoard& board, Type type, unsigned short diceValue) : GamePiece(board), type(type), diceValue(diceValue) {
18-
if(type != WOOD || type != SHEEP || type != ORE || type != BRICK || type != GRAIN || type != DESERT) {
18+
if(type != WOOD && type != SHEEP && type != ORE && type != BRICK && type != GRAIN && type != DESERT) {
1919
throw runtime_error("Invalid resource tile type");
2020
}
2121
if(diceValue < 2 || diceValue > 12) {

0 commit comments

Comments
 (0)