Esempio n. 1
0
        private void AddDice(PlayerSprit pv, Dice dice)
        {
            var d = new DiceView(dice);

            d.Clicked += Dice_Clicked;
            pv.deck.Controls.Add(d);
        }
Esempio n. 2
0
        private void Mov(int move, PlayerSprit item)
        {
            game.Player.Position += move;
            if (game.Player.LastPosition >= 0)
            {
                if (!new int[] { 0, 12, 18 }.Contains(game.Player.LastPosition % 24))
                {
                    SpawnOnMove(game.Player.LastPosition);
                }
            }
            game.Player.LastPosition = game.Player.Position;

            Move(item, game.Player.Position);
        }
Esempio n. 3
0
 private void PlayerTwoInit()
 {
     sprite2 = new PlayerSprit
     {
         deck            = flowLayoutPanel2,
         BackgroundImage = Properties.Resources.superhero2
     };
     sprite2.deck.Controls.Clear();
     foreach (var item in player2.SpecialDices)
     {
         AddDice(sprite2, item);
     }
     player2.GoHome();
     Mov(12, sprite2);
 }
Esempio n. 4
0
 private void PlayerOneInit()
 {
     sprite1 = new PlayerSprit
     {
         deck            = flowLayoutPanel1,
         BackgroundImage = Properties.Resources.superhero1
     };
     sprite1.deck.Controls.Clear();
     foreach (var item in player1.SpecialDices)
     {
         AddDice(sprite1, item);
     }
     player1.GoHome();
     Mov(0, sprite1);
 }
Esempio n. 5
0
        private void AddDice(PlayerSprit pv, bool forceNumber = false)
        {
            if (forceNumber)
            {
                game.Player.Hand.GetNumberDice();
            }
            else
            {
                game.Player.Hand.GetNextDice();
            }

            var dice = game.Player.Hand.Last();

            AddDice(pv, dice);
        }