Tile.cs 396 B

1234567891011121314151617181920
  1. namespace Day17;
  2. public class Tile
  3. {
  4. public Vec Position { get; }
  5. public int Cost { get; }
  6. public char Display { get; private set; }
  7. public Tile(int x, int y, int cost)
  8. {
  9. Position = new Vec(x, y);
  10. Cost = cost;
  11. Display = Cost.ToString()[0];
  12. }
  13. public void SetDisplay(char display)
  14. {
  15. Display = display;
  16. }
  17. }