When you go into endless mode the game just stops drawing cards. Fun little game though, the Expand, Hive, Raze, Garden combo kind of makes it impossible to lose though. Also the non-buildings you place on the ground seem to count towards the building cap (Growth, Expand). Possibly razed buildings also count, i forgot to check that.