JavaScript strategy game