예제 #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="Button"/> class.
 /// </summary>
 /// <param name="regularTexture">The name of the button's texture.</param>
 /// <param name="pressedTexture">The name of the texture to display when the
 /// button is pressed.</param>
 /// <param name="input">A <see cref="GameStateManagement.InputState"/> object
 /// which can be used to retrieve user input.</param>
 /// <param name="cardGame">The associated card game.</param>
 /// <remarks>Texture names are relative to the "Images" content
 /// folder.</remarks>
 public Button(string regularTexture, string pressedTexture, InputState input,
               CardsGame cardGame)
     : base(cardGame, null)
 {
     this.input          = input;
     this.regularTexture = regularTexture;
     this.pressedTexture = pressedTexture;
 }
예제 #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="BetGameComponent"/> class.
 /// </summary>
 /// <param name="players">A list of participating players.</param>
 /// <param name="input">An instance of
 /// <see cref="GameStateManagement.InputState"/> which can be used to
 /// check user input.</param>
 /// <param name="theme">The name of the selcted card theme.</param>
 /// <param name="cardGame">An instance of <see cref="CardsGame"/> which
 /// is the current game.</param>
 public BetGameComponent(List <Player> players, InputState input,
                         string theme, CardsGame cardGame)
     : base(cardGame.Game)
 {
     this.players  = players;
     this.theme    = theme;
     this.cardGame = cardGame;
     this.input    = input;
     chipsAssets   = new Dictionary <int, Texture2D>();
 }
예제 #3
0
 /// <summary>
 /// Creates a new instance of the
 /// <see cref="BlackjackAnimatedDealerHandComponent"/> class.
 /// </summary>
 /// <param name="place">A number indicating the hand's position on the
 /// game table.</param>
 /// <param name="hand">The dealer's hand.</param>
 /// <param name="cardGame">The associated game.</param>
 public BlackjackAnimatedDealerHandComponent(int place, Hand hand,
                                             CardsGame cardGame) : base(place, hand, cardGame)
 {
 }
예제 #4
0
 /// <summary>
 /// Creates a new instance of the
 /// <see cref="BlackjackAnimatedPlayerHandComponent"/> class.
 /// </summary>
 /// <param name="place">A number indicating the hand's position on the
 /// game table.</param>
 /// <param name="hand">The player's hand.</param>
 /// <param name="cardGame">The associated game.</param>
 /// <param name="offset">An offset which will be added to all card locations
 /// returned by this component.</param>
 public BlackjackAnimatedPlayerHandComponent(int place, Vector2 offset,
                                             Hand hand, CardsGame cardGame)
     : base(place, hand, cardGame)
 {
     this.offset = offset;
 }
예제 #5
0
 /// <summary>
 /// Creates a new instance of the <see cref="BlackjackAIPlayer"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="game">The game.</param>
 public BlackjackAIPlayer(string name, CardsGame game)
     : base(name, game)
 {
 }