moved canBuild() and getStructureAt() to index.html