THIS IS REALLY UNFINISHED but im gonna try to make it a full on tycoon-esque game Jaydeplay here, I rewrote it so that it is more reusable and customizable with the custom blocks. I also fixed your grid.