Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Tile"/> class.
 /// </summary>
 /// <param name="x">The x-position.</param>
 /// <param name="y">The y-position.</param>
 /// <param name="mowStatus">The mow status of the tile.</param>
 /// <param name="occupied">Whether the tile is occupied or not.</param>
 public Tile(uint x, uint y, MowStatus mowStatus, bool occupied)
 {
     this.Position = new GridPosition((int)x, (int)y);
     this.Occupied = occupied;
     this.SetMowStatus(mowStatus);
     SetCurrentStateAsInitialState();
 }
Пример #2
0
 public void SetMowStatus(MowStatus value)
 {
     mowStatus = value;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Tile"/> class.
 /// </summary>
 /// <param name="position">The position of the tile.</param>
 /// <param name="mowStatus">The mow status of the tile.</param>
 /// <param name="occupied">Whether the tile is occupied or not.</param>
 public Tile(GridPosition position, MowStatus mowStatus, bool occupied)
     : this((uint)position.X, (uint)position.Y, mowStatus, occupied)
 {
 }
Пример #4
0
 /// <summary>
 /// Sets the current state of the tile as the initial one.
 /// </summary>
 public void SetCurrentStateAsInitialState()
 {
     initialOccupiedState = Occupied;
     initialMowStatus     = this.GetMowStatus();
 }