Playing the Game

The game can be run in a graphical user interface (GUI).

The files of the GUI are separated. ants.py knows nothing of graphics or turn time limits.

To start a graphical game, run

$ python gui.py

When you start the graphical game, a browser will be automatically opened. In the starter implementation, you have unlimited food and your ants can only throw leaves at bees in their current Place. Before you complete Problem 2, the GUI may crash since it doesn't have a full conception of what a Place is yet! Try playing the game anyway! You'll need to place a lot of ThrowerAnts (the second type) in order to keep the bees from reaching your queen.

The game has several options that you will use throughout the project, which you can view with python gui.py --help.

$ python gui.py --help
usage: gui.py [-h] [-d DIFFICULTY] [-w] [--food FOOD]

Play Ants vs. SomeBees

options:
  -h, --help     show this help message and exit
  -d DIFFICULTY  sets difficulty of game (test/easy/normal/hard/extra-hard)
  -w, --water    loads a full layout with water
  --food FOOD    number of food to start with when testing