Implemented maximum number of energy buildings in a row