#region Using directives

using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

#endregion

namespace PunkMan.Game
{
    /// <summary>
    /// Cell of map class
    /// </summary>
    public class MapCell
    {
        /// <summary>
        /// Entity type
        /// </summary>
        public enum EntityType
        {
            /// <summary>
            /// Player start position
            /// </summary>
            Start,
            /// <summary>
            /// Level exit
            /// </summary>
            End,
            /// <summary>
            /// Monster start point
            /// </summary>
            Monster,
            /// <summary>
            /// Bottle of rum
            /// </summary>
            Rum,
            /// <summary>
            /// Bottle of absinth
            /// </summary>
            Absinth,
            /// <summary>
            /// Empty place
            /// </summary>
            None = 0x7fffffff
        }

        /// <summary>
        /// texture index into texture manager
        /// </summary>
        private int index;
        /// <summary>
        /// can play walk here
        /// </summary>
        private bool walkable;
        /// <summary>
        /// can player walk here
        /// </summary>
        /// <value>realy can?</value>
        public bool Walkable{
            get { return walkable; }
            set { walkable = value; }
        }
        /// <summary>
        /// index of texture
        /// </summary>
        /// <value></value>
        public int Index
        {
            get { return index; }
            set { index = value; }
        }

        /// <summary>
        /// type of entity
        /// </summary>
        private EntityType entity;
        /// <summary>
        /// the type of entity
        /// </summary>
        /// <value></value>
        public EntityType Entity
        {
            get { return entity; }
            set { entity = value; }
        }


        /// <summary>
        /// Implicit constructor
        /// </summary>
        public MapCell()
        {
            index = 0;
            walkable = false;
            entity = EntityType.None;
        }

        /// <summary>
        /// Mighty constructor
        /// </summary>
        /// <param name="walkable">can player walk here</param>
        public MapCell(bool walkable)
        {
            this.walkable = walkable;
            index = 0;
            entity = EntityType.None;
        }

        /// <summary>
        /// O mithty constructor
        /// </summary>
        /// <param name="walkable">can player walk here</param>
        /// <param name="index">index of texture</param>
        public MapCell(bool walkable, int index)
        {
            this.walkable = walkable;
            this.index = index;
            entity = EntityType.None;
        }
    }
}
