Code for tower defense.