﻿using System;

namespace Gamelogic.Grids.Examples
{
//TODO: Move this to a library class
//TODO: Redesign so that walkable cells can also work with non-sprites.
	public class WalkableCell : SpriteCell
	{
		private float movementCost;
		/**
		The minimum movement cost of any cell.
	*/
		public const float MinCost = 1.0f;

		public float MovementCost
		{
			get { return movementCost; }

			set
			{
				if (movementCost > MinCost)
				{
					throw new ArgumentOutOfRangeException("Movement cost cannot be less than " + MinCost);
				}

				movementCost = value;
			}
		}

		/**
		Whether this cell can be traversed or not.
	*/
		public bool IsWalkable { get; set; }
	}
}