Esempio n. 1
0
        private void AntiblockCardSelected()
        {
            ListBoxItems.Show();
            ButtonUseCard.Show();
            ButtonDiscardCard.Show();

            PlayerSet myPlayer = Game.Players.Where(player => player.Name == Game.Player.Name).First();

            if (myPlayer.Blocks.HasValue)
            {
                if (Game.Player.SelectedCard.BlockType.Value.HasFlag(BlockType.Cart))
                {
                    if (myPlayer.Blocks.Value.HasFlag(BlockType.Cart))
                    {
                        ListBoxItems.Items.Add(BlockType.Cart);
                    }
                }
                if (Game.Player.SelectedCard.BlockType.Value.HasFlag(BlockType.Lantern))
                {
                    if (myPlayer.Blocks.Value.HasFlag(BlockType.Lantern))
                    {
                        ListBoxItems.Items.Add(BlockType.Lantern);
                    }
                }
                if (Game.Player.SelectedCard.BlockType.Value.HasFlag(BlockType.Pickaxe))
                {
                    if (myPlayer.Blocks.Value.HasFlag(BlockType.Pickaxe))
                    {
                        ListBoxItems.Items.Add(BlockType.Pickaxe);
                    }
                }
            }
        }
Esempio n. 2
0
 private void HideControls()
 {
     PictureBoxPathPos1.Hide();
     PictureBoxPathPos2.Hide();
     ListBoxItems.Items.Clear();
     ListBoxItems.Hide();
     ButtonUseCard.Hide();
     ButtonDiscardCard.Hide();
     ButtonEndTurn.Hide();
     LabelGoalCard.Text = "";
 }
Esempio n. 3
0
        private void BlockCardSelected()
        {
            ListBoxItems.Show();
            ButtonUseCard.Show();
            ButtonDiscardCard.Show();

            PlayerSet[] players = Game.Players.Where(player => player.Name != "Field" &&
                                                     player.Name != "Deck" &&
                                                     player.Name != "Graveyard" &&
                                                     player.Name != Game.Player.Name &&
                                                     !player.Blocks.Value.HasFlag(Game.Player.SelectedCard.BlockType)).ToArray();
            ListBoxItems.Items.AddRange(players);
        }