Example #1
0
        public void RockVsScissorsNotEqualTie()
        {
            var user = new Rock();
            var computer = new Scissors();

            var result = user.Challenge(computer);

            Assert.AreNotEqual(GameResult.Tie, result);
        }
Example #2
0
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( Deleted || !from.CanSee( this ) )
				return false;

			base.ScissorHelper( from, new Bone(), Utility.RandomMinMax( 10, 15 ) );

			return true;
		}
Example #3
0
        public void PaperVsScissorsLose()
        {
            var user = new Paper();
            var computer = new Scissors();

            var result = user.Challenge(computer);

            Assert.AreEqual(GameResult.Lose, result);
        }
        public void ScissorsVsRockLose()
        {
            var user = new Scissors();
            var computer = new Rock();

            var result = user.Challenge(computer);

            Assert.AreEqual(GameResult.Lose, result);
        }
Example #5
0
        public void PaperVsScissorsNotEqualWin()
        {
            var user = new Paper();
            var computer = new Scissors();

            var result = user.Challenge(computer);

            Assert.AreNotEqual(GameResult.Win, result);
        }
        public void ScissorsVsRockNotEqualWin()
        {
            var user = new Scissors();
            var computer = new Rock();

            var result = user.Challenge(computer);

            Assert.AreNotEqual(GameResult.Win, result);
        }
        public void ScissorsVsScissorsTie()
        {
            var user = new Scissors();
            var computer = new Scissors();

            var result = user.Challenge(computer);

            Assert.AreEqual(GameResult.Tie, result);
        }
Example #8
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            base.ScissorHelper(from, new Bone(), Utility.RandomMinMax(10, 15));

            return(true);
        }
Example #9
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            base.ScissorHelper(from, new Bandage(), 1);

            return(true);
        }
Example #10
0
 public virtual bool Scissor(Mobile from, Scissors scissors)
 {
     if (IsAccessibleTo(from))
     {
         scissors.PublicOverheadMessage(
             MessageType.Regular,
             0x3B2,
             1071918
             ); // You can't cut through the plague beast's amorphous skin with scissors!
     }
     return(false);
 }
                    public void ShouldBeatScissors()
                    {
                        // Arrange
                        var expected = GameResult.Win;
                        var player   = new Rock();
                        var opponent = new Scissors();
                        var game     = new GameEngine();
                        // Act
                        var actual = game.Play(player, opponent);

                        // Assert
                        Assert.AreEqual(expected, actual);
                    }
                    public void ShouldLooseToScissors()
                    {
                        // Arrange
                        var expected = GameResult.Loose;
                        var player   = new Paper();
                        var opponent = new Scissors();
                        var game     = new GameEngine();
                        // Act
                        var actual = game.Play(player, opponent);

                        // Assert
                        Assert.AreEqual(expected, actual);
                    }
Example #13
0
 async Task Closepicture()
 {
     Rock.Hide();
     paper.Hide();
     Scissors.Hide();
     PlayerC.Hide();
     BOTC.Hide();
     PLAYERNAME.Hide();
     BOTNAME.Hide();
     POINTPLAYER.Hide();
     POINTBOT.Hide();
     POINTNUMBERBOT.Visible    = false;
     POINTNUMBERPLAYER.Visible = false;
 }
Example #14
0
 void HotKeys_KeyDown(object sender, KeyEventArgs e)//горячме клавиши
 {
     if (e.KeyCode == Keys.Z)
     {
         Rock.PerformClick();
     }
     if (e.KeyCode == Keys.X)
     {
         Scissors.PerformClick();
     }
     if (e.KeyCode == Keys.C)
     {
         Paper.PerformClick();
     }
 }
Example #15
0
 void HotKeys_KeyDown(object sender, KeyEventArgs e)//горячме клавиши
 {
     if (e.KeyCode == Keys.Z)
     {
         Rock.PerformClick();// имитируем нажатие button1
     }
     if (e.KeyCode == Keys.X)
     {
         Scissors.PerformClick();// имитируем нажатие button1
     }
     if (e.KeyCode == Keys.C)
     {
         Paper.PerformClick();// имитируем нажатие button1
     }
 }
Example #16
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (DateTime.Now < m_NextWoolTime)
            {
                // This sheep is not yet ready to be shorn.
                PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500449, from.NetState);
                return(false);
            }

            from.SendLocalizedMessage(500452);               // You place the gathered wool into your backpack.
            from.AddToBackpack(new Wool(Map == Map.Felucca ? 2 : 1));

            NextWoolTime = DateTime.Now + TimeSpan.FromHours(3.0);               // TODO: Proper time delay

            return(true);
        }
Example #17
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
                return(false);
            }
            base.ScissorHelper(from, new Leather(), 1);

            return(true);
        }
        static void Main(string[] args)
        {
            Paper    paper    = new Paper("");
            Rock     rock     = new Rock("");
            Scissors scissors = new Scissors("");

            Console.WriteLine(paper.GetResult(scissors)); // Paper vs scissors - loss
            Console.WriteLine(paper.GetResult(rock));     // Paper vs rock - win
            Console.WriteLine(paper.GetResult(paper));    // Paper vs Paper - draw


            RockPaperScissorsGame game = new RockPaperScissorsGame();
            var firstPick  = game.GetRandomElement();
            var secondPick = game.GetRandomElement();

            Console.WriteLine($"{firstPick.GetType().Name} vs {secondPick.GetType().Name}  = {firstPick.GetResult(secondPick)}");
        }
Example #19
0
            public InternalSellInfo()
            {
                Add(typeof(BoltOfCloth), BoltOfCloth.GetSBSellValue());

                Add(typeof(Scissors), Scissors.GetSBSellValue());
                Add(typeof(SewingKit), SewingKit.GetSBSellValue());
                Add(typeof(Dyes), Dyes.GetSBSellValue());
                Add(typeof(DyeTub), DyeTub.GetSBSellValue());

                Add(typeof(SkullCap), SkullCap.GetSBSellValue());
                Add(typeof(Bandana), Bandana.GetSBSellValue());
                Add(typeof(FloppyHat), FloppyHat.GetSBSellValue());
                Add(typeof(Cap), Cap.GetSBSellValue());
                Add(typeof(WideBrimHat), WideBrimHat.GetSBSellValue());
                Add(typeof(TallStrawHat), TallStrawHat.GetSBSellValue());
                Add(typeof(Bonnet), Bonnet.GetSBSellValue());
                Add(typeof(FeatheredHat), FeatheredHat.GetSBSellValue());
                Add(typeof(TricorneHat), TricorneHat.GetSBSellValue());
                Add(typeof(JesterHat), JesterHat.GetSBSellValue());
                Add(typeof(WizardsHat), WizardsHat.GetSBSellValue());

                Add(typeof(Doublet), Doublet.GetSBSellValue());
                Add(typeof(Shirt), Shirt.GetSBSellValue());
                Add(typeof(FancyShirt), FancyShirt.GetSBSellValue());
                Add(typeof(Tunic), Tunic.GetSBSellValue());
                Add(typeof(Surcoat), Surcoat.GetSBSellValue());
                Add(typeof(JesterSuit), JesterSuit.GetSBSellValue());
                Add(typeof(PlainDress), PlainDress.GetSBSellValue());
                Add(typeof(FancyDress), FancyDress.GetSBSellValue());
                Add(typeof(Robe), Robe.GetSBSellValue());

                Add(typeof(ShortPants), ShortPants.GetSBSellValue());
                Add(typeof(LongPants), LongPants.GetSBSellValue());
                Add(typeof(Kilt), Kilt.GetSBSellValue());
                Add(typeof(Skirt), Skirt.GetSBSellValue());

                Add(typeof(Cloak), Cloak.GetSBSellValue());
                Add(typeof(BodySash), BodySash.GetSBSellValue());
                Add(typeof(HalfApron), HalfApron.GetSBSellValue());
                Add(typeof(FullApron), FullApron.GetSBSellValue());

                Add(typeof(Sandals), Sandals.GetSBSellValue());
                Add(typeof(Shoes), Shoes.GetSBSellValue());
                Add(typeof(Boots), Boots.GetSBSellValue());
                Add(typeof(ThighBoots), ThighBoots.GetSBSellValue());
            }
Example #20
0
        /// <summary>
        /// Pops a scissor rectangle and deactivate scissor if stack is empty
        /// </summary>
        public static void PopScissor()
        {
            if (Scissors.Count == 0)
            {
                return;
            }

            Scissors.Pop();

            if (Scissors.Count > 0)
            {
                ScissorZone = Scissors.Peek();
            }

            if (Scissors.Count == 0)
            {
                RenderState.Scissor = false;
            }
        }
Example #21
0
 public void Clear()
 {
     Renderpasses.Clear();
     Pipelines.Clear();
     StencilWrites.Clear();
     Viewports.Clear();
     Scissors.Clear();
     DepthBias.Clear();
     LineWidths.Clear();
     DepthBounds.Clear();
     BlendConstants.Clear();
     VAOs.Clear();
     StencilFunctions.Clear();
     Draws.Clear();
     DrawIndexeds.Clear();
     DrawIndirects.Clear();
     DrawIndexedIndirects.Clear();
     DescriptorSets.Clear();
 }
Example #22
0
        public static void Main()
        {
            var box = new Box();

            var moliv = new Pencil("red");
            var himikal = new Pen("blue");
            var nojica = new Scissors("Plastic"); // Приема като аргумент само Plastic / Iron

            Console.WriteLine(nojica.Cut());

            box.AddItems(moliv, himikal, nojica);

            foreach (var item in box.Items)
            {
                Console.WriteLine(item);
            }

            himikal.ChangeState();

            Console.WriteLine(himikal);
        }
Example #23
0
        public static void Main()
        {
            var box = new Box();

            var moliv   = new Pencil("red");
            var himikal = new Pen("blue");
            var nojica  = new Scissors("Plastic"); // Приема като аргумент само Plastic / Iron

            Console.WriteLine(nojica.Cut());

            box.AddItems(moliv, himikal, nojica);

            foreach (var item in box.Items)
            {
                Console.WriteLine(item);
            }

            himikal.ChangeState();

            Console.WriteLine(himikal);
        }
Example #24
0
 async Task Visibleturerps() //เปิดภาพ ค้อน กรรไกร กระดาษ
 {
     Rock.Show();
     paper.Show();
     Scissors.Show();
     PlayerC.Show();
     BOTC.Show();
     PLAYERNAME.Show();
     BOTNAME.Show();
     POINTPLAYER.Show();
     POINTBOT.Show();
     POINTBOT.Visible          = false;
     POINTPLAYER.Visible       = false;
     POINTNUMBERBOT.Visible    = false;
     POINTNUMBERPLAYER.Visible = false;
     Rock.Visible       = false;
     Scissors.Visible   = false;
     paper.Visible      = false;
     PlayerC.Visible    = false;
     BOTC.Visible       = false;
     PLAYERNAME.Visible = false;
     BOTNAME.Visible    = false;
 }
    // Start is called before the first frame update
    void Start()
    {
        musicTriger = true;
        MainMenu.SetActive(false);
        if (IsMainMenu == true)
        {
            MainMenuActive();

            Staging.SetActive(true);
            OptionsDash.SetActive(false);
        }

        IsLabelsMenu = false;
        Paused       = false;
        //su = FindObjectOfType<GameManager>().GetComponent<SoundUpdater>();
        tape     = FindObjectOfType <Tape>().GetComponent <Tape>();
        scissors = FindObjectOfType <Scissors>().GetComponent <Scissors>();
        //CameraTransitions = FindObjectOfType<Animator>().GetComponent<Animator>();
        //Exh = FindObjectOfType<Exhaust>().GetComponent<Exhaust>();
        Gm = FindObjectOfType <GameManager>().GetComponent <GameManager>();
        //stopTime = GameObject.Find("UI Screens").GetComponent<Timer>();
        TS = FindObjectOfType <TruckScore>().GetComponent <TruckScore>();
    }
Example #26
0
    public static Scissors Parse(SqlString s)
    {
        if (s.IsNull)
        {
            return(Null);
        }
        else
        {
            string[] values = s.Value.Split(@"/".ToCharArray());

            Scissors sciss = new Scissors();

            sciss.m_Price   = double.Parse(values[0]);
            sciss.m_Color   = values[1];
            sciss.m_Quality = values[2];


            if (!sciss.Validate())
            {
                throw new ArgumentException("Invalid values!");
            }
            return(sciss);
        }
    }
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Arrow", typeof(Arrow), Arrow.GetSBPurchaseValue(), 500, 0xF3F, 0));
                Add(new GenericBuyInfo("Bolt", typeof(Bolt), Bolt.GetSBPurchaseValue(), 500, 0x1BFB, 0));
                Add(new GenericBuyInfo("Bandage", typeof(Bandage), Bandage.GetSBPurchaseValue(), 250, 0xE21, 0));

                Add(new GenericBuyInfo("Scissors", typeof(Scissors), Scissors.GetSBPurchaseValue(), 25, 0xF9F, 0));
                Add(new GenericBuyInfo("Sewing Kit", typeof(SewingKit), SewingKit.GetSBPurchaseValue(), 50, 0xF9D, 0));
                Add(new GenericBuyInfo("Dyes", typeof(Dyes), Dyes.GetSBPurchaseValue(), 25, 0xFA9, 0));
                Add(new GenericBuyInfo("Dye Tub", typeof(DyeTub), DyeTub.GetSBPurchaseValue(), 25, 0xFAB, 0));

                Add(new GenericBuyInfo("Lockpick", typeof(Lockpick), Lockpick.GetSBPurchaseValue(), 100, 0x14FC, 0));
                Add(new GenericBuyInfo("Skillet", typeof(Skillet), Skillet.GetSBPurchaseValue(), 50, 0x97F, 0));
                Add(new GenericBuyInfo("Dagger", typeof(Dagger), Dagger.GetSBPurchaseValue(), 25, 0xF52, 0));

                Add(new GenericBuyInfo("Lantern", typeof(Lantern), Lantern.GetSBPurchaseValue(), 25, 0xA25, 0));
                Add(new GenericBuyInfo("Torch", typeof(Torch), Torch.GetSBPurchaseValue(), 25, 0xF6B, 0));
                Add(new GenericBuyInfo("Candle", typeof(Candle), Candle.GetSBPurchaseValue(), 25, 0xA28, 0));
                Add(new GenericBuyInfo("Bedroll", typeof(Bedroll), Bedroll.GetSBPurchaseValue(), 25, 0xA57, 0));
                Add(new GenericBuyInfo("Backpack", typeof(Backpack), Backpack.GetSBPurchaseValue(), 25, 0x9B2, 0));
                Add(new GenericBuyInfo("Bag", typeof(Bag), Bag.GetSBPurchaseValue(), 25, 0xE76, 0));
                Add(new GenericBuyInfo("Pouch", typeof(Pouch), Pouch.GetSBPurchaseValue(), 25, 0xE79, 0));
                Add(new GenericBuyInfo("Wooden Box", typeof(WoodenBox), WoodenBox.GetSBPurchaseValue(), 25, 0xE7D, 0));
            }
            public InternalSellInfo()
            {
                Add(typeof(Arrow), Arrow.GetSBSellValue());
                Add(typeof(Bolt), Bolt.GetSBSellValue());
                Add(typeof(Bandage), Bandage.GetSBSellValue());

                Add(typeof(Scissors), Scissors.GetSBSellValue());
                Add(typeof(SewingKit), SewingKit.GetSBSellValue());
                Add(typeof(Dyes), Dyes.GetSBSellValue());
                Add(typeof(DyeTub), DyeTub.GetSBSellValue());

                Add(typeof(Lockpick), Lockpick.GetSBSellValue());
                Add(typeof(Skillet), Skillet.GetSBSellValue());
                Add(typeof(Dagger), Dagger.GetSBSellValue());

                Add(typeof(Lantern), Lantern.GetSBSellValue());
                Add(typeof(Torch), Torch.GetSBSellValue());
                Add(typeof(Candle), Candle.GetSBSellValue());
                Add(typeof(Bedroll), Bedroll.GetSBSellValue());
                Add(typeof(Backpack), Backpack.GetSBSellValue());
                Add(typeof(Bag), Bag.GetSBSellValue());
                Add(typeof(Pouch), Pouch.GetSBSellValue());
                Add(typeof(WoodenBox), WoodenBox.GetSBSellValue());
            }
Example #29
0
 public override bool Scissor(Mobile from, Scissors scissors)
 {
     return(Helpers.CutLeather(this, from));
 }
Example #30
0
 public override bool Scissor(Mobile from, Scissors scissors)
 {
     from.SendLocalizedMessage(502440);               // Scissors can not be used on that to produce anything.
     return(false);
 }
Example #31
0
 /// <summary>
 /// Clears and deactivates the scissor zone
 /// </summary>
 public static void ClearScissor()
 {
     Scissors.Clear();
     RenderState.Scissor = false;
 }
Example #32
0
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( Deleted || !from.CanSee( this ) ) return false;

			if ( Core.AOS && !IsChildOf ( from.Backpack ) )
			{
				from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
				return false;
			}

			base.ScissorHelper( from, new BarbedLeather(), 1 );

			return true;
		}
Example #33
0
 /*
 public override bool Dye(Mobile from, DyeTub sender)
 {
     from.SendLocalizedMessage(sender.FailMessage);
     return false;
 }
 */
 public override bool Scissor(Mobile from, Scissors scissors)
 {
     from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
     return false;
 }
Example #34
0
 public InternalTarget(Scissors item) : base(2, false, TargetFlags.None) => m_Item = item;
Example #35
0
 public override bool?Beats(Scissors other)
 {
     return(true);
 }
        public void Scissors_Wins_Against_Paper()
        {
            var scissors = new Scissors();

            Assert.True(scissors.WinAgainst(new Paper()));
        }
Example #37
0
 private void Awake()
 {
     scissors = GetComponent <Scissors>();
 }
 public void Setup()
 {
     _paper    = new Paper("");
     _rock     = new Rock("");
     _scissors = new Scissors("");
 }
        public void Scissors_Loses_Agains_Rock()
        {
            var scissors = new Scissors();

            Assert.False(scissors.WinAgainst(new Rock()));
        }
Example #40
0
        public void PaperBeatsScissorTest()
        {
            Scissors other = new Scissors();

            Assert.AreEqual(me.Beats(other), false);
        }
Example #41
0
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( Deleted || !from.CanSee( this ) ) return false;

			base.ScissorHelper( from, new BarbedLeather(), 1 );

			return true;
		}