Пример #1
0
        public ReadOnlyCollection <string> GetTeam(FieldObjects.Player.TeamId team)
        {
            List <string> t = new List <string>();

            // TODO: Fill in the list of players on the specified team

            return(new ReadOnlyCollection <string>(t));
        }
Пример #2
0
 private static void CreateTeam(ref List <FieldObject> fieldObjects, FieldObjects.Player.TeamId team)
 {
     fieldObjects.Add(new FieldObjects.LabelledPlayer("LW", team, playerSize));
     fieldObjects.Add(new FieldObjects.LabelledPlayer("C", team, playerSize));
     fieldObjects.Add(new FieldObjects.LabelledPlayer("RW", team, playerSize));
     fieldObjects.Add(new FieldObjects.LabelledPlayer("LD", team, playerSize));
     fieldObjects.Add(new FieldObjects.LabelledPlayer("RD", team, playerSize));
     fieldObjects.Add(new FieldObjects.LabelledPlayer("G", team, playerSize));
 }
Пример #3
0
        public ReadOnlyCollection <string> GetTeam(FieldObjects.Player.TeamId team)
        {
            List <string> playersOnTeam = new List <string>();

            for (int i = 1; i <= playersPerTeam; i++)
            {
                playersOnTeam.Add(FieldObjects.NumberedPlayer.ComposeTag(team, i));
            }
            return(new ReadOnlyCollection <string>(playersOnTeam));
        }
Пример #4
0
        private void AppendPlayerPositions(FieldLayout layout, FieldObjects.Player.TeamId teamId, bool putOnLeftSide)
        {
            const float spacing                = 3.25F;
            const float benchIndent            = 5.0F;
            const float benchDistanceFromField = 5.25F;

            float benchY        = Width + benchDistanceFromField;
            float benchStartPos = benchIndent;

            if (!putOnLeftSide)
            {
                benchStartPos += Length / 2.0F;
            }

            for (int playerNumber = 1; playerNumber <= playersPerTeam; playerNumber++)
            {
                string playerTag = FieldObjects.NumberedPlayer.ComposeTag(teamId, playerNumber);
                layout.AddEntry(playerTag, benchStartPos + (spacing * playerNumber), benchY);
            }
        }