Stack.GetAmount C# (CSharp) Method

GetAmount() public method

public GetAmount ( ) : int
return int
    public int GetAmount()
    {
        return Amount;
    }

Usage Example

Exemplo n.º 1
0
Arquivo: Deal.cs Projeto: hbons/Deal
    static void Main()
    {
        Clutter.Application.Init ();

        Stage = new Stage ();
        Stage.Title = "Deal!";
        Stage.Add (new Texture ("Pixmaps/Table.png"));
        Stage.SetSize (800, 480);
        Stage.KeyPressEvent += HandleKeyPress;

        Texture C = new Texture ("Pixmaps/Coin.png");
        C.SetSize (50, 50);
        C.SetPosition (35, 405);
        Stage.Add (C);

        Bet = 0;
        BetButton = new BetButton ();
        BetButton.ButtonPressEvent += IncreaseBet;
        Stage.Add (BetButton);

        DealButton = new DealButton ();
        DealButton.ButtonPressEvent += NewGame;
        Stage.Add (DealButton);

        StepButton = new StepButton ();
        StepButton.ButtonPressEvent += NextStep;
        Stage.Add (StepButton);

        Stack = new Stack ();
        Stack.Decrease (20);
        ScoreText = new Text ("Droid Sans Bold 21", "" + Stack.GetAmount());
        ScoreText.SetColor (new Clutter.Color (0xff, 0xff, 0xff, 0xff));
        ScoreText.SetPosition (100, 413);
        Stage.Add (ScoreText);

        Coins = new Coin [5];
        Coins [0] = new Coin ();
        Coins [1] = new Coin ();
        Coins [2] = new Coin ();
        Coins [3] = new Coin ();
        Coins [4] = new Coin ();
        for (int i = 0; i < 5; i++) {
            Coins [i].SetPosition (35, 405);
            Stage.Add (Coins [i]);
        }

        Deck = new Deck ();

        PlayerHand   = new Hand (Deck.Draw (), Deck.Draw (), Deck.Draw (), Deck.Draw (), Deck.Draw ());
        OpponentHand = new Hand (Deck.Draw (), Deck.Draw (), Deck.Draw (), Deck.Draw (), Deck.Draw ());

        SetupAnimation ();

        Stage.ShowAll();

        Clutter.Application.Run ();
    }