public AnimatedHandGameComponent(int place, Hand hand, Cards_FrameWork.Game.CardsGame cardGame) : base(cardGame, null) { Place = place; hand.ReceivedCard += Hand_ReceiveCard; hand.LostCard += Hand_LostCard; if (place == -1) { CurrentPosition = CardGame.GameTable.DealerPosition; } else { CurrentPosition = CardGame.GameTable[place]; } for (int cardIndex = 0; cardIndex < hand.Count; cardIndex++) { AnimatedCardsGameComponent animatedCardGameComponent = new AnimatedCardsGameComponent(hand[cardIndex], CardGame) { CurrentPosition = CurrentPosition + new Vector2(30 * cardIndex, 0) }; heldAnimationCards.Add(animatedCardGameComponent); Game.Components.Add(animatedCardGameComponent); } Game.Components.ComponentRemoved += Components_ComponentRemoved; }
public BetGameComponent(List <Cards_FrameWork.Player.Player> players, ScreenManager.InputState input, string theme, Cards_FrameWork.Game.CardsGame cardGame) : base(cardGame.Game) { this.players = players; this.theme = theme; this.cardGame = cardGame; this.input = input; chipAssets = new Dictionary <int, Texture2D>(); }
private static void CalculateValue(Hand hand, Cards_FrameWork.Game.CardsGame game, out int value, out bool considerAce) { value = 0; considerAce = false; for (int cardIndex = 0; cardIndex < hand.Count; cardIndex++) { value += game.CardValue(hand[cardIndex]); if (hand[cardIndex].Value == CardValue.Ace) { considerAce = true; } if (considerAce && value + 10 > 21) { considerAce = false; } } }
public Player(string name, Cards_FrameWork.Game.CardsGame game) { Name = name; Game = game; Hand = new Hand(); }
public BlackJackAnimatedPlayerHandComponent(int place, Vector2 offSet, Hand hand, Cards_FrameWork.Game.CardsGame cardGame) : base(place, hand, cardGame) { this.offSet = offSet; }
public Button(string regularTexture, string pressedTexture, ScreenManager.InputState input, Cards_FrameWork.Game.CardsGame cardGame) : base(cardGame, null) { this.input = input; this.regularTexture = regularTexture; this.pressedTexture = pressedTexture; }
public BlackJackAIPlayer(string name, Cards_FrameWork.Game.CardsGame game) : base(name, game) { }
public BlackjackPlayer(string name, Cards_FrameWork.Game.CardsGame game) : base(name, game) { Balance = 500; CurrentHandType = HandTypes.First; }
public BlackJackAnimatedDealerHandComponent(int place, Hand hand, Cards_FrameWork.Game.CardsGame cardGame) : base(place, hand, cardGame) { }