Javascript tri towers grid game