| | | 1 | | namespace Safarimacik.Model; |
| | | 2 | | |
| | | 3 | | |
| | | 4 | | /// <summary> |
| | | 5 | | /// Base class for all tiles. |
| | | 6 | | /// </summary> |
| | | 7 | | public abstract class Tile(int viewRange, float speed) { |
| | | 8 | | public readonly int ViewRange = viewRange; |
| | | 9 | | public readonly float Speed = speed; |
| | | 10 | | public Plant? Plant; |
| | | 11 | | } |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Representation of a placeable tile. |
| | | 15 | | /// </summary> |
| | | 16 | | public class Road : Tile, Purchasable { |
| | | 17 | | public const int Price = 100; |
| | | 18 | | int Purchasable.Price => Price; |
| | | 19 | | public Road() : base(3, 1) { } |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Representation of the entrance and exit for the safari. |
| | | 24 | | /// </summary> |
| | 1 | 25 | | public class Gateway(bool isExit) : Tile(3, 0.5f) { |
| | 0 | 26 | | public bool IsExit => isExit; |
| | | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Representation of a placeable tile. |
| | | 31 | | /// </summary> |
| | | 32 | | public class Water : Tile, Purchasable { |
| | | 33 | | public const int Price = 100; |
| | | 34 | | |
| | | 35 | | int Purchasable.Price => Price; |
| | | 36 | | public static int Nutrition => 20; |
| | | 37 | | |
| | | 38 | | public Water() : base(3, 0.5f) { } |
| | | 39 | | } |
| | | 40 | | |
| | | 41 | | /// <summary> |
| | | 42 | | /// Representation of a tile. |
| | | 43 | | /// </summary> |
| | | 44 | | public class Hill : Tile { |
| | | 45 | | public Hill() : base(6, 0.5f) { } |
| | | 46 | | } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Representation of a tile. |
| | | 50 | | /// </summary> |
| | | 51 | | public class Grass : Tile { |
| | | 52 | | public Grass() : base(3, 1) { } |
| | | 53 | | } |