/* town.h
 *
 * Represents a map.
 *
 * (c) 2006, Joseph Curtis
 */

#define MAX_TOWN_NAME 20

#define MAX_TOWN_ARMY_PRODUCTION 4

struct army_production {
  char type;
  char time;
  char cost;
};

/**
 * Contains all information about a particular town
 */
struct town {
  char name[MAX_TOWN_NAME];
  int x, y; /* coords of the top-left cell of the town (in cells) */
  int image; /* indexed like cell images except will blit CELL_WIDTH*2
		from x and CELL_HEIGHT*2 from y. */
  char defence;
  char owner; /* Index of the player who owns it. */
  short int income;
  char num_production; /* number of distinct armies that can be
			       produced by this town. */
  struct army_production production[MAX_TOWN_ARMY_PRODUCTION];
  short int current_production; /* which army is currently under
				   production. -1 means no production
				   is taking place. */
  char current_production_turns; /* number of turns left in the
				    current production. */
  short int production_transfer; /* town production is being
				    transferred to.  By default it is
				    this town. */
};

