Ejemplo n.º 1
0
        public GameAction(TeamAction firstTeamAction, TeamAction secondTeamAction)
        {
            Contract.Requires<ArgumentNullException>(firstTeamAction != null);
            Contract.Requires<ArgumentNullException>(secondTeamAction != null);

            _firstTeamAction = firstTeamAction;
            _secondTeamAction = secondTeamAction;
        }
Ejemplo n.º 2
0
        private static TeamPosition GetNewTeamPosition(TeamPosition currentTeamPosition, TeamAction secondTeamAction)
        {
            IDictionary<Player, PlayerPosition> firstTeamPositions = new Dictionary<Player, PlayerPosition>();
            foreach (KeyValuePair<Player, PlayerPosition> playerPosition in currentTeamPosition)
            {
                firstTeamPositions.Add(playerPosition.Key, new PlayerPosition());
            }

            return new TeamPosition(firstTeamPositions);
        }