using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Slayter
{
    public class Castle:SpecialObjectsMap,IDrawable,IMoveable
    {
        public Player owner;
        Castle self;
        public Castle(Texture2D t,Map map, int[] coordinates,Player owner)
            : base(t, map, coordinates, delegate(GameScreen screen, MapObject obj) {
                Castle castle = (Castle)obj;
                if (owner != screen.parent.currentPlayer)
                {
                    owner.RemoveCastle(castle);
                    owner = screen.parent.currentPlayer;
                }
                //screen.parent.changeScreen();
                screen.parent.setMessageScreen(new CastleScreen(castle,map.parent.parent,"CastleScreen"));
            })
        {
            self = this;
            this.owner = owner;
        }
    }
}
