public Player(rGame G, String Name, Boolean isAI, Color Colour) { g = G; name = Name; ai = isAI; colour = Colour; }
public int continent; //The continent this nation belongs to public Nation(rGame game, int X, int Y, Texture2D texture, int Continent, Player Ownership, Nation[] Neighbors, String Name) { g = game; x = X; y = Y; tex = texture; Owner = Ownership; neighbors = Neighbors; continent = Continent; name = Name; }
// Initialization code protected override void Initialize() { //Define the 8 colours that players can have. Colours.Add(Color.FromNonPremultiplied(240, 40, 40, 255)); //red Colours.Add(Color.FromNonPremultiplied(140, 230, 50, 255)); //green Colours.Add(Color.FromNonPremultiplied(110, 160, 210, 255)); //blue Colours.Add(Color.FromNonPremultiplied(250, 230, 80, 255)); //yellow Colours.Add(Color.FromNonPremultiplied(170, 100, 170, 255)); //purple Colours.Add(Color.FromNonPremultiplied(135, 135, 135, 255)); //gray Colours.Add(Color.FromNonPremultiplied(250, 175, 60, 255)); //orange Colours.Add(Color.FromNonPremultiplied(140, 90, 0, 255)); //brown //Make the list of players and start a game (Temporary code) List<Player> ps = new List<Player>(); ps.Add(new Player(Game, "reetbau1", false, Colours[0])); ps.Add(new Player(Game, "reetbau2", false, Colours[1])); ps.Add(new Player(Game, "reetbau3", false, Colours[2])); ps.Add(new Player(Game, "reetbau4", false, Colours[3])); ps.Add(new Player(Game, "REETBAU5", false, Colours[4])); ps.Add(new Player(Game, "reetbau6", false, Colours[5])); Game = new rGame(this, ps, true, "default"); //Create a new offlineGame instance. This is to be called whenever someone creates a new game. base.Initialize(); }