Exemplo n.º 1
0
        private static void MeetTheWalker(GrandMom baba, Walker walker)
        {
            DialogResult result = MessageBox.Show("Want to buy a bag?", "PoliticianCrusade", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                if (baba.Money.Quantity >= baba.Bag.Price)
                {
                    if (baba.Bag.RemainingPower < 100)
                    {
                        baba.Bag.RemainingPower = 100;
                        baba.Money.Quantity    -= baba.Bag.Price;
                    }
                    else
                    {
                        MessageBox.Show("You have full bag power");
                    }
                }
                else
                {
                    MessageBox.Show("You don't have enough money");
                }
            }
            baba.ClearImg();
            baba.CoordY += 3;
            baba.RenderImg();
            Console.SetCursorPosition(64, 4);
            walker.RenderImg();
        }
Exemplo n.º 2
0
        private static void MeetTheBGMom(GrandMom baba, BGMom mom)
        {
            DialogResult result = MessageBox.Show("Want to buy a gun?", "PoliticianCrusade", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                if (baba.Money.Quantity >= baba.Gun.Price)
                {
                    if (true)
                    {
                        baba.Gun.RemainingPower = 100;
                        baba.Money.Quantity    -= baba.Gun.Price;
                    }
                    else
                    {
                        MessageBox.Show("You have full gun power");
                    }
                }
                else
                {
                    MessageBox.Show("You don't have enough money");
                }
            }
            baba.ClearImg();
            baba.CoordY += 3;
            baba.RenderImg();
            Console.SetCursorPosition(30, 4);
            mom.RenderImg();
        }
Exemplo n.º 3
0
        private static void HandleCrashes(GrandMom baba)
        {
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    foreach (var enemy in baba.EnemyList)
                    {
                        if ((baba.CoordX + i == enemy.CoordX && baba.CoordY + j == enemy.CoordY) ||
                            (baba.CoordX + i == enemy.CoordX + 1 && baba.CoordY + j == enemy.CoordY + 1) ||
                            (baba.CoordX + i == enemy.CoordX + 2 && baba.CoordY + j == enemy.CoordY + 2))
                        {
                            Thread.Sleep(200);

                            if (enemy.GetType().Name == "Politician")
                            {
                                if (baba.Umbrella.RemainingPower > 0)
                                {
                                    baba.Umbrella.RemainingPower -= 10;
                                }

                                if (baba.Gun.RemainingPower > 0)
                                {
                                    baba.Gun.RemainingPower -= 20;
                                }
                                baba.RenderImg();
                            }
                            else if (enemy.GetType().Name == "Policeman")
                            {
                                if (baba.Bag.RemainingPower > 0)
                                {
                                    baba.Bag.RemainingPower -= 20;
                                }

                                if (baba.Cane.RemainingPower > 0)
                                {
                                    baba.Cane.RemainingPower -= 10;
                                }
                                baba.RenderImg();
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
        private static void MeetTheWalker(GrandMom baba, Walker walker)
        {
            DialogResult result = MessageBox.Show("Want to buy a bag?", "PoliticianCrusade", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                if (baba.Money.Quantity >= baba.Bag.Price)
                {
                    if (baba.Bag.RemainingPower < 100)
                    {
                        baba.Bag.RemainingPower = 100;
                        baba.Money.Quantity -= baba.Bag.Price;
                    }
                    else
                    {
                        MessageBox.Show("You have full bag power");
                    }
                }
                else
                {
                    MessageBox.Show("You don't have enough money");
                }
            }
            baba.ClearImg();
            baba.CoordY += 3;
            baba.RenderImg();
            Console.SetCursorPosition(64, 4);
            walker.RenderImg();
        }
Exemplo n.º 5
0
        private static void MeetTheBGMom(GrandMom baba, BGMom mom)
        {
            DialogResult result = MessageBox.Show("Want to buy a gun?", "PoliticianCrusade", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                if (baba.Money.Quantity >= baba.Gun.Price)
                {
                    if (true)
                    {
                        baba.Gun.RemainingPower = 100;
                        baba.Money.Quantity -= baba.Gun.Price;
                    }
                    else
                    {
                        MessageBox.Show("You have full gun power");
                    }
                }
                else
                {
                    MessageBox.Show("You don't have enough money");
                }
            }
            baba.ClearImg();
            baba.CoordY += 3;
            baba.RenderImg();
            Console.SetCursorPosition(30, 4);
            mom.RenderImg();
        }
Exemplo n.º 6
0
        private static void HandleCrashes(GrandMom baba)
        {
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    foreach (var enemy in baba.EnemyList)
                    {
                        if ((baba.CoordX + i == enemy.CoordX && baba.CoordY + j == enemy.CoordY) ||
                            (baba.CoordX + i == enemy.CoordX + 1 && baba.CoordY + j == enemy.CoordY + 1) ||
                            (baba.CoordX + i == enemy.CoordX + 2 && baba.CoordY + j == enemy.CoordY + 2))
                        {
                            Thread.Sleep(200);

                            if (enemy.GetType().Name == "Politician")
                            {
                                if (baba.Umbrella.RemainingPower > 0)
                                {
                                    baba.Umbrella.RemainingPower -= 10;
                                }

                                if (baba.Gun.RemainingPower > 0)
                                {
                                    baba.Gun.RemainingPower -= 20;
                                }
                                baba.RenderImg();
                            }
                            else if (enemy.GetType().Name == "Policeman")
                            {
                                if (baba.Bag.RemainingPower > 0)
                                {
                                    baba.Bag.RemainingPower -= 20;
                                }

                                if (baba.Cane.RemainingPower > 0)
                                {
                                    baba.Cane.RemainingPower -= 10;
                                }
                                baba.RenderImg();
                            }

                        }
                    }
                }
            }
        }