Example #1
0
bool Tiles::AreAllCompatibleWith(Tile const& rTile) const {
    bool result = true;

    ConstIterator i_tile;
    for (i_tile = begin(); i_tile != end(); i_tile++) {
        Tile const tile = *i_tile;
        if (!tile.IsCompatibleWith(&rTile)) {
            return false;
        }
    }

    return result;
}
Example #2
0
bool Tiles::AreAllCompatible(void) const {
    ConstIterator i_tile;
    for (i_tile = begin(); i_tile != end(); i_tile++) {
        Tile const tile = *i_tile;
        ConstIterator i_tile2 = i_tile;
        for (i_tile2++; i_tile2 != end(); i_tile2++) {
            Tile const tile2 = *i_tile2;
            if (!tile2.IsCompatibleWith(&tile)) {
                return false;
            }
        }
    }

    return true; 
}