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

#define MAX_TOWN_NAME 20

#define MAX_TOWN_ARMY_PRODUCTION 4

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

/**
 * 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. */
  int defence; // char
  int owner; /* Index of the player who owns it. */ // char
  int income; // short int
  char num_production; /* number of distinct armies that can be
			  produced by this town. */
  struct army_production production[MAX_TOWN_ARMY_PRODUCTION];
  int current_production; /* which army is currently under
			     production. -1 means no production
			     is taking place. Indexes the
			     production array. */ // short int
  int current_production_turns; /* number of turns left in the
				   current production. */ // short int
  int production_transfer; /* town production is being
			      transferred to.  By default it is
			      this town. */ // short int
};

