예제 #1
0
        public void Development_should_have_correct_properties()
        {
            TwoOnysAndTwoSapphires.TotalGemsOfType(Gems.Diamond).Should().Be(0);
            TwoOnysAndTwoSapphires.TotalGemsOfType(Gems.Ruby).Should().Be(0);
            TwoOnysAndTwoSapphires.TotalGemsOfType(Gems.Onyx).Should().Be(2);
            TwoOnysAndTwoSapphires.TotalGemsOfType(Gems.Sapphire).Should().Be(2);
            TwoOnysAndTwoSapphires.TotalGemsOfType(Gems.Emerald).Should().Be(0);
            TwoOnysAndTwoSapphires.TotalGemsOfType(Gems.Gold).Should().Be(0);

            TwoOnysAndTwoSapphires.TotalGems().Should().Be(4);
            TwoOnysAndTwoSapphires.Bonus.Should().Be(Gems.Diamond);
            TwoOnysAndTwoSapphires.Level.Should().Be(Level.Level1);
            ((int)TwoOnysAndTwoSapphires.Prestige).Should().Be(0);
            TwoOnysAndTwoSapphires.ToStringWithPrice().Should().Contain("2 onyx");
            TwoOnysAndTwoSapphires.ToStringWithPrice().Should().Contain("2 sapphires");
        }
예제 #2
0
        public void Draw()
        {
            switch (Status)
            {
            case CardStatus.NoCard:
                Pbx.Image = null;
                Activable = false;
                Selected  = false;
                TtAyuda.SetToolTip(Pbx, "");
                SetHelp(IconChar.None, "");
                break;

            case CardStatus.FaceUp:
                Pbx.Image = Development.GetImage();
                SetHelp(IconChar.None, "");
                TtAyuda.SetToolTip(Pbx, Development.ToStringWithPrice());
                break;

            case CardStatus.FaceDown:
                Pbx.Image = NamedPath.DevelopmentBack(Development.Level).GetImage();
                TtAyuda.SetToolTip(Pbx, "");
                SetHelp(IconChar.None, "");
                break;

            default:
                break;
            }
        }