コード例 #1
0
ファイル: Squad.cs プロジェクト: voidgit/CloudBall
        public void Action(Team myTeam, Team enemyTeam, Ball ball, MatchInfo matchInfo)
        {
            var pitch = new Pitch(myTeam, enemyTeam, ball, matchInfo);

            var height = (int)Field.MyGoal.Height;
            var step = height/(myTeam.Players.Count + 1);

            var roles = Enumerable.Range(1, myTeam.Players.Count)
                .Select(p => new GateStanderRole(new Vector(0, Field.MyGoal.Y + p*step)))
                .Zip(myTeam.Players, Tuple.Create);

            foreach (var role in roles)
                role.Item1.DoAction(role.Item2, pitch);
        }
コード例 #2
0
ファイル: GateStanderRole.cs プロジェクト: voidgit/CloudBall
 public void DoAction(Player self, Pitch pitch)
 {
     self.ActionGo(position);
 }