public Team(TeamScheme scheme, ITeamStrategy strategy, List<Player> players) { TeamScheme = scheme; TeamStrategy = strategy; _players = players; SetDefaultPlayersPositions(); SetPlayersStartPositions(); }
public Team(Player[] players, ITeamStrategy strategy) { Contract.Requires<ArgumentNullException>(players != null); Contract.Requires<ArgumentNullException>(strategy != null); _players = players; _strategy = strategy; }
public void Update(ITeamStrategy strategy) { try { ChangePosition(strategy); } catch (Exception e) { } }
/// <summary> /// Initializes a new instance of the <see cref="Team" /> class with the specified strategy, players, and goal bounds. /// </summary> /// <param name="strategy">The team strategy.</param> /// <param name="players">The team players.</param> /// <param name="goalBounds">The bounds of the goal.</param> public Team(ITeamStrategy strategy, ReadOnlyCollection<PointMass> players, RectangleF goalBounds) { Contract.Requires<ArgumentNullException>(strategy != null); Contract.Requires<ArgumentNullException>(players != null); Contract.Requires<ArgumentException>(Contract.ForAll(players, p => p != null)); Contract.Requires<ArgumentException>(goalBounds.Width > 0 && goalBounds.Height > 0); _strategy = strategy; Players = players; GoalBounds = goalBounds; }
public void setStartegy(ITeamStrategy teamStrategy) { this._teamStrategy = teamStrategy; Console.WriteLine("Strategy Changing......."); }
public Team(ITeamStrategy T) { TeamStrategy = T; }
public void SetStrategy(ITeamStrategy strategy) { _strategy = strategy; }
//ContextInterface to set the strategy public void SetStrategy(ITeamStrategy s) { //Set the strategy strategy = s; }