public void NewPlayerKeybindingsComponent()
        {
            var player    = new RogueLikeEntity((0, 0), Color.White, 1);
            var component = new PlayerKeybindingsComponent();

            Assert.Empty(component.Motions);
            Assert.Empty(component.Actions);

            player.AllComponents.Add(component);

            Assert.Single(player.SadComponents);
            Assert.Single(player.GoRogueComponents);
        }
        public void AddComponentTest()
        {
            var entity    = new RogueLikeEntity((1, 3), Color.Cyan, 2);
            var component = new PlayerKeybindingsComponent();

            Assert.Empty(component.Motions);
            Assert.Empty(component.Actions);

            entity.AllComponents.Add(component);

            Assert.Single(entity.SadComponents);
            Assert.Single(entity.GoRogueComponents);
        }
        public Player(Point position, int fovRadius = 10)
            : base(position, 1, false)
        {
            // Set FOV radius we will use for calculating FOV
            FOVRadius = fovRadius;

            // Set hook so that FOV is recalculated when the player moves
            Moved += OnMoved;

            // Add component for controlling player movement via keyboard
            var motionControl = new PlayerKeybindingsComponent();

            motionControl.SetMotions(PlayerKeybindingsComponent.ArrowMotions);
            AllComponents.Add(motionControl);
        }