public override void TakeAction( Player player, out object data ) { player.Resources[AllResources.Reed] += this.Resources[AllResources.Reed]; player.Resources[AllResources.Stone] += this.Resources[AllResources.Stone]; player.Resources[AllResources.Food] += this.Resources[AllResources.Food]; data = null; }
private void newGameToolStripMenuItem_Click( object sender, EventArgs e ) { GameSetupForm setup = new GameSetupForm(); DialogResult result = setup.ShowDialog(); if( result == DialogResult.OK ) { gm = new GameManager(); // get all the players from the dialog int numPlayers = Properties.Settings.Default.NumPlayers; if( numPlayers >= 1 ) { Player p = new Player( setup.player1NameBox.Text ); gm.Players.Add( p ); } if( numPlayers >= 2 ) { Player p = new Player( setup.player2NameBox.Text ); gm.Players.Add( p ); } if( numPlayers >= 3 ) { Player p = new Player( setup.player3NameBox.Text ); gm.Players.Add( p ); } if( numPlayers >= 4 ) { Player p = new Player( setup.player4NameBox.Text ); gm.Players.Add( p ); } if( numPlayers >= 5 ) { Player p = new Player( setup.player5NameBox.Text ); gm.Players.Add( p ); } gm.StartGame(); } }
public override void TakeAction( Player player, out object data ) { player.Resources[AllResources.Sheep] += this.Resources[AllResources.Sheep]; this.Resources[AllResources.Sheep] = 0; data = null; }
public override void TakeAction( Player player, out object data ) { throw new NotImplementedException(); }
private void TakeActionRegular( Player player, out object data ) { throw new NotImplementedException(); }
public override void TakeAction( Player player, out object data ) { this.ActionDelegate( player, out data ); }
public override void TakeAction( Player player, out object data ) { player.Resources[AllResources.Vegetable]++; data = null; }
private void TakeActionRegular( Player player, out object data ) { player.Resources[AllResources.Food] += 2; data = null; }
private void TakeActionFamily( Player player, out object data ) { player.Resources[AllResources.Food]++; //todo Add logic to allow player to choose a resource throw new NotImplementedException(); }
/// <summary> /// What happens when a player chooses this Action. /// </summary> /// <param name="player">The player who took the Action.</param> /// <param name="data">An optional parameter that Actions can use to pass back data to the caller. Not all Actions will use this data.</param> public abstract void TakeAction( Player player, out object data );
public FamilyMember( Player owner ) { this.Owner = owner; }