C# Класс FootballSimulation.Simulation

Represents a simulation of an indoor football game.
Наследование: ISimulation
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Simulate ( float time ) : void

Simulates one step of the football game.

Simulation ( ReadOnlyCollection teams, PointMass ball, RectangleF pitchBounds, float friction ) : System

Initializes a new instance of the Simulation class.

Приватные методы

Метод Описание
OnGoalScored ( Team scoringTeam ) : void
OnReset ( ) : void
ResolveBallDirection ( IEnumerable kicks ) : Vector2
SimulateBall ( float time, IEnumerable kicks ) : void
SimulatePlaying ( float time ) : void
SimulateResetting ( float time ) : void

Описание методов

Simulate() публичный Метод

Simulates one step of the football game.
public Simulate ( float time ) : void
time float The time step length.
Результат void

Simulation() публичный Метод

Initializes a new instance of the Simulation class.
public Simulation ( ReadOnlyCollection teams, PointMass ball, RectangleF pitchBounds, float friction ) : System
teams ReadOnlyCollection The teams to be played against each other.
ball PointMass The ball.
pitchBounds System.Drawing.RectangleF The pitch boundaries.
friction float The friction coefficient.
Результат System