Wrote assign_batteries, working on assign_defenses