Example #1
0
        private static void PutDownCardOfPlayer(Card nextCard)
        {
            GameData.Player.Cards.Remove(nextCard);

            Animate.Move(nextCard,
                         GameData.LocPlayer.Left, GameData.LocPlayer.Top,
                         GameData.LocBoard.Left + (GameData.LocBoard.Width - nextCard.CardImage.Width) / 2, GameData.LocBoard.Top);

            GameData.OpenCards.Add(nextCard);

            GameData.FlagDirty = true;
        }
Example #2
0
        private static void PutDownOpponentCard(Card nextCard)
        {
            Logger.FuncInit("Logic.putDownOpponentCard");
            GameData.Opponnent.Cards.Remove(nextCard);

            Animate.Move(nextCard,
                         GameData.LocOpponent.Left, GameData.LocOpponent.Top,
                         GameData.LocBoard.Left + (GameData.LocBoard.Width - nextCard.CardImage.Width) / 2, GameData.LocBoard.Top);

            GameData.OpenCards.Add(nextCard);

            GameData.FlagDirty = true;
            Logger.FuncExit("Logic.putDownOpponentCard");
        }
Example #3
0
        private static void AddCardToOpponent()
        {
            if (GameData.Deck.Count > 0)
            {
                Animate.Move(GameData.BackFacingCard,
                             new Point(GameData.LocSlot.Location.X + (GameData.LocSlot.Width - GameData.BackFacingCard.CardImage.Width) / 2,
                                       GameData.LocSlot.Location.Y),
                             GameData.LocOpponent.Location);

                GameData.Opponnent.AddCard(GameData.Deck.GetACard());
            }
            else
            {
                ReloadDeckFromOpenCards();
            }

            GameData.FlagDirty = true;
        }
Example #4
0
        public static void AddCardToPlayer()
        {
            if (GameData.Deck.Count > 0)
            {
                Animate.Move(GameData.BackFacingCard,
                             new Point(GameData.LocSlot.Location.X + (GameData.LocSlot.Width - GameData.BackFacingCard.CardImage.Width) / 2,
                                       GameData.LocSlot.Location.Y),
                             GameData.LocPlayer.Location);

                GameData.Player.AddCard(GameData.Deck.GetACard());
            }
            else
            {
                ReloadDeckFromOpenCards();
                //    else
                //    {
                //        System.Windows.Forms.MessageBox.Show("I am confused now!\r\nPlease contact the developer!!", "Err..",
                //                        System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
                //    }
            }

            GameData.FlagDirty = true;
        }