def addBlock(self): ## create block bf = BlockFactory(self.height, self.width, self.wall, self.ground) bf.createBlocK() ## connect blocks lastBlockIndex = len(self.row) - 1 endingYPoint = self.row[lastBlockIndex].getEndingYPoint() if endingYPoint != bf.getStartingYPoint(): bf.connectBlockHorizontal(endingYPoint) ## add block to row self.row.append(bf)
def appendBlock(self): bf = BlockFactory(self.height, self.width, self.wall, self.ground) bf.createBlocK() self.row.append(bf)