Пример #1
0
 public Game(Team teamHome, Team teamAway, Ball ball, Playground playground)
 {
     TeamHome   = teamHome;
     TeamAway   = teamAway;
     _ball      = ball;
     Playground = playground;
     FindPlayersDefaultZone();
     GameEngine.CurrentGame = this;
 }
Пример #2
0
 public Game(Team teamHome, Team teamAway, Ball ball, Playground playground)
 {
     TeamHome = teamHome;
     TeamAway = teamAway;
     _ball = ball;
     Playground = playground;
     FindPlayersDefaultZone();
     GameEngine.CurrentGame = this;
 }
Пример #3
0
 public static void Init()
 {
     TestBall = new Ball();
     TestPlayground = new Playground("Anfield");
     InitPlayers();
     TestTeamHome = new Team(TeamScheme.Home451,new BalancedStrategy(),playersHome);
     TestTeamAway = new Team(TeamScheme.Away451,new BalancedStrategy(),playersAway);
     TestBall.AttachObserver(TestTeamAway);
     TestBall.AttachObserver(TestTeamHome);
     TestGame = new Game(TestTeamHome,TestTeamAway,TestBall,TestPlayground);
 }
Пример #4
0
 public Player(
     string name,
     PlayerType type,
     Playground playground,
     int number,
     int speedPoints,
     int defensePoints,
     int dribblePoints,
     int shootPowerPoints,
     int shootAccuracyPoints
     )
 {
     Name                = name;
     _state              = PlayerState.Free;
     Type                = type;
     _playground         = playground;
     Number              = number;
     SpeedPoints         = speedPoints;
     DefensePoints       = defensePoints;
     DribblePoints       = dribblePoints;
     ShootAccuracyPoints = shootAccuracyPoints;
     ShootPowerPoints    = shootPowerPoints;
 }