示例#1
0
        private void timerCharacter_Tick(object sender, EventArgs e)
        {
            if (paduinKnowledgeScore >= 100)
            {
                paduinKnowledgeScore = 100;
            }
            if (paduinDrunkScore >= 100)
            {
                paduinDrunkScore = 100;
            }
            if (jediDrunkScore >= 100)
            {
                jediDrunkScore = 100;
            }
            if (assistantDrunkScore >= 100)
            {
                assistantDrunkScore = 100;
            }

            this.paduinKnowledge.Text = String.Format("Paduin Knowledge : {0} %", this.paduinKnowledgeScore);
            this.jediDrunk.Text = String.Format("Jedi Drunk : {0} %", this.jediDrunkScore);
            this.assistantDrunk.Text = String.Format("Assistant Drunk : {0} %", this.assistantDrunkScore);
            this.paduinDrunk.Text = String.Format("Paduin Drunk : {0} %", this.paduinDrunkScore);

            if (this.jediDrunkScore == 100 || this.paduinKnowledgeScore == 100)
            {
                JediIsDrunk();
            }
            if (this.assistantDrunkScore == 100 || this.paduinDrunkScore == 100)
            {
                AssistantIsDrunk();
            }

            //Games End
            if (this.paduinKnowledgeScore == 100 && this.paduinDrunkScore == 100)
            {
                timer.Stop();
                Hide();
                EndScreen end = new EndScreen();
                end.LoserScreen();
                end.ShowDialog();
                Close();
            }
            else if (this.jediDrunkScore == 100 && this.assistantDrunkScore == 100)
            {
                timer.Stop();
                Hide();
                EndScreen end = new EndScreen();
                end.WinnerScreen();
                end.ShowDialog();
                Close();
            }

            AskQuestion();

            if (this.pictureBox4.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory2 = Direction.None;
                this.pictureBox4.Hide();
                this.pictureBox4.Location = new Point(this.pictureBox4.Location.X - this.paduin.Location.X + 60, this.pictureBox4.Location.Y);
            }

            if (this.pictureBox5.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory3 = Direction.None;
                this.pictureBox5.Hide();
                this.pictureBox5.Location = new Point(this.pictureBox5.Location.X - this.paduin.Location.X + 60, this.pictureBox5.Location.Y);
            }

            if (this.pictureBox7.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory5 = Direction.None;
                this.pictureBox7.Hide();
                this.pictureBox7.Location = new Point(this.pictureBox7.Location.X - this.paduin.Location.X + 60, this.pictureBox7.Location.Y);
            }

            if (this.pictureBox8.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory6 = Direction.None;
                this.pictureBox8.Hide();
                this.pictureBox8.Location = new Point(this.pictureBox8.Location.X - this.paduin.Location.X + 60, this.pictureBox8.Location.Y);
            }

            if (this.pictureBox9.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory7 = Direction.None;
                this.pictureBox9.Hide();
                this.pictureBox9.Location = new Point(this.pictureBox9.Location.X - this.paduin.Location.X + 60, this.pictureBox9.Location.Y);
            }

            if (this.pictureBox11.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinDrunkScore = this.paduinDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionCategory9 = Direction.None;
                this.pictureBox11.Hide();
                this.pictureBox11.Location = new Point(822, 120);
            }

            if (this.pictureBox12.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinDrunkScore = this.paduinDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionCategory10 = Direction.None;
                this.pictureBox12.Hide();
                this.pictureBox12.Location = new Point(822, 240);
            }
            if (this.pictureBox13.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinDrunkScore = this.paduinDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionCategory11 = Direction.None;
                this.pictureBox13.Hide();
                this.pictureBox13.Location = new Point(822, 400);
            }

            //Paduin Beer hits enemy jedi
            if (this.beerBox.Bounds.IntersectsWith(this.enemyBox.Bounds) ||
                this.beerBox.Left >= 800 || this.beerBox.Left <= 10)
            {
                this.jediDrunkScore = this.jediDrunkScore + this.jedi.KnowledgeDamage;
                this.directionBeer = Direction.None;
                this.beerBox.Hide();
                this.beerBox.Location = new Point(412, 259);
            }

            //Paduin Beer hits enemy assistant
            if (this.beerBox.Bounds.IntersectsWith(this.pictureBox1.Bounds) ||
                this.beerBox.Left >= 800 || this.beerBox.Left <= 10)
            {
                this.assistantDrunkScore = this.assistantDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionBeer = Direction.None;
                this.beerBox.Hide();
                this.beerBox.Location = new Point(412, 259);
            }

            //First Category
            if (this.enemyBox.Location.Y == this.pictureBox3.Location.Y)
            {
                this.pictureBox3.Visible = true;
                this.pictureBox3.Location = new Point(this.pictureBox3.Location.X, this.pictureBox3.Location.Y);
                this.directionCategory1 = Direction.Right;
            }
            if (this.pictureBox3.Left >= 740)
            {
                this.directionCategory1 = Direction.None;
                this.pictureBox3.Hide();
                this.pictureBox3.Location = new Point(this.pictureBox3.Location.X - 720, this.pictureBox3.Location.Y);
            }

            //Second Category
            if (this.enemyBox.Location.Y == this.pictureBox4.Location.Y)
            {
                this.pictureBox4.Visible = true;
                this.pictureBox4.Location = new Point(this.pictureBox4.Location.X, this.pictureBox4.Location.Y);
                this.directionCategory2 = Direction.Right;
            }
            if (this.pictureBox4.Left >= 740)
            {
                this.directionCategory2 = Direction.None;
                this.pictureBox4.Hide();
                this.pictureBox4.Location = new Point(this.pictureBox4.Location.X - 720, this.pictureBox4.Location.Y);
            }

            //Third Category
            if (this.enemyBox.Location.Y == this.pictureBox5.Location.Y)
            {
                this.pictureBox5.Visible = true;
                this.pictureBox5.Location = new Point(this.pictureBox5.Location.X, this.pictureBox5.Location.Y);
                this.directionCategory3 = Direction.Right;
            }
            if (this.pictureBox5.Left >= 740)
            {
                this.directionCategory3 = Direction.None;
                this.pictureBox5.Hide();
                this.pictureBox5.Location = new Point(this.pictureBox5.Location.X - 720, this.pictureBox5.Location.Y);
            }

            //Forth Category
            if (this.enemyBox.Location.Y == this.pictureBox6.Location.Y)
            {
                this.pictureBox6.Visible = true;
                this.pictureBox6.Location = new Point(this.pictureBox6.Location.X, this.pictureBox6.Location.Y);
                this.directionCategory4 = Direction.Right;
            }
            if (this.pictureBox6.Left >= 740)
            {
                this.directionCategory4 = Direction.None;
                this.pictureBox6.Hide();
                this.pictureBox6.Location = new Point(this.pictureBox6.Location.X - 720, this.pictureBox6.Location.Y);
            }

            //Fifth Category
            if (this.enemyBox.Location.Y == this.pictureBox7.Location.Y)
            {
                this.pictureBox7.Visible = true;
                this.pictureBox7.Location = new Point(this.pictureBox7.Location.X, this.pictureBox7.Location.Y);
                this.directionCategory5 = Direction.Right;
            }
            if (this.pictureBox7.Left >= 740)
            {
                this.directionCategory5 = Direction.None;
                this.pictureBox7.Hide();
                this.pictureBox7.Location = new Point(this.pictureBox7.Location.X - 720, this.pictureBox7.Location.Y);
            }

            //Sixth Category
            if (this.enemyBox.Location.Y == this.pictureBox8.Location.Y)
            {
                this.pictureBox8.Visible = true;
                this.pictureBox8.Location = new Point(this.pictureBox8.Location.X, this.pictureBox8.Location.Y);
                this.directionCategory6 = Direction.Right;
            }
            if (this.pictureBox8.Left >= 740)
            {
                this.directionCategory6 = Direction.None;
                this.pictureBox8.Hide();
                this.pictureBox8.Location = new Point(this.pictureBox8.Location.X - 720, this.pictureBox8.Location.Y);
            }

            //Seventh Category
            if (this.enemyBox.Location.Y == this.pictureBox9.Location.Y)
            {
                this.pictureBox9.Visible = true;
                this.pictureBox9.Location = new Point(this.pictureBox9.Location.X, this.pictureBox9.Location.Y);
                this.directionCategory7 = Direction.Right;
            }
            if (this.pictureBox9.Left >= 740)
            {
                this.directionCategory7 = Direction.None;
                this.pictureBox9.Hide();
                this.pictureBox9.Location = new Point(this.pictureBox9.Location.X - 720, this.pictureBox9.Location.Y);
            }

            //Eight Category
            if (this.enemyBox.Location.Y == this.pictureBox10.Location.Y)
            {
                this.pictureBox10.Visible = true;
                this.pictureBox10.Location = new Point(this.pictureBox10.Location.X, this.pictureBox10.Location.Y);
                this.directionCategory8 = Direction.Right;
            }
            if (this.pictureBox10.Left >= 740)
            {
                this.directionCategory8 = Direction.None;
                this.pictureBox10.Hide();
                this.pictureBox10.Location = new Point(this.pictureBox10.Location.X - 720, this.pictureBox10.Location.Y);
            }

            //BeerOne Category
            if (this.pictureBox1.Location.Y == this.pictureBox11.Location.Y)
            {
                this.pictureBox11.Visible = true;
                this.pictureBox11.Location = new Point(this.pictureBox11.Location.X, this.pictureBox11.Location.Y);
                this.directionCategory9 = Direction.Left;
            }
            if (this.pictureBox11.Left <= 100)
            {
                this.directionCategory9 = Direction.None;
                this.pictureBox11.Hide();
                this.pictureBox11.Location = new Point(822, 120);
            }

            //BeerTwo Category
            if (this.pictureBox1.Location.Y == this.pictureBox12.Location.Y)
            {
                this.pictureBox12.Visible = true;
                this.pictureBox12.Location = new Point(this.pictureBox12.Location.X, this.pictureBox12.Location.Y);
                this.directionCategory10 = Direction.Left;
            }
            if (this.pictureBox12.Left <= 100)
            {
                this.directionCategory10 = Direction.None;
                this.pictureBox12.Hide();
                this.pictureBox12.Location = new Point(822, 240);
            }
            //BeerThree Category
            if (this.pictureBox1.Location.Y == this.pictureBox13.Location.Y)
            {
                this.pictureBox13.Visible = true;
                this.pictureBox13.Location = new Point(this.pictureBox13.Location.X, this.pictureBox13.Location.Y);
                this.directionCategory11 = Direction.Left;
            }
            if (this.pictureBox13.Left <= 100)
            {
                this.directionCategory11 = Direction.None;
                this.pictureBox13.Hide();
                this.pictureBox13.Location = new Point(822, 400);
            }

            //Paduins Direction
            this.PaduinDirectionsMethod();

            //Category direction - only Right
            this.CategoriesDirectionMethod();

            //Jedi Character direction - only Up and Down
            this.JediDirectionsMethod();

            //Assistant direction - only Up and Down
            this.AssistantDirectionsMethod();

            //Beer direction
            if (this.directionBeer == Direction.Right)
            {
                beerBox.Left += 5;
            }
            else if (this.directionBeer == Direction.Left)
            {
                beerBox.Left -= 5;
            }

            Invalidate();
        }
示例#2
0
        private void timerCharacter_Tick(object sender, EventArgs e)
        {
            if (paduinKnowledgeScore >= 100)
            {
                paduinKnowledgeScore = 100;
            }
            if (paduinDrunkScore >= 100)
            {
                paduinDrunkScore = 100;
            }
            if (jediDrunkScore >= 100)
            {
                jediDrunkScore = 100;
            }
            if (assistantDrunkScore >= 100)
            {
                assistantDrunkScore = 100;
            }

            this.paduinKnowledge.Text = String.Format("Paduin Knowledge : {0} %", this.paduinKnowledgeScore);
            this.jediDrunk.Text       = String.Format("Jedi Drunk : {0} %", this.jediDrunkScore);
            this.assistantDrunk.Text  = String.Format("Assistant Drunk : {0} %", this.assistantDrunkScore);
            this.paduinDrunk.Text     = String.Format("Paduin Drunk : {0} %", this.paduinDrunkScore);

            if (this.jediDrunkScore == 100 || this.paduinKnowledgeScore == 100)
            {
                JediIsDrunk();
            }
            if (this.assistantDrunkScore == 100 || this.paduinDrunkScore == 100)
            {
                AssistantIsDrunk();
            }

            //Games End
            if (this.paduinKnowledgeScore == 100 && this.paduinDrunkScore == 100)
            {
                timer.Stop();
                Hide();
                EndScreen end = new EndScreen();
                end.LoserScreen();
                end.ShowDialog();
                Close();
            }
            else if (this.jediDrunkScore == 100 && this.assistantDrunkScore == 100)
            {
                timer.Stop();
                Hide();
                EndScreen end = new EndScreen();
                end.WinnerScreen();
                end.ShowDialog();
                Close();
            }


            AskQuestion();

            if (this.pictureBox4.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory2   = Direction.None;
                this.pictureBox4.Hide();
                this.pictureBox4.Location = new Point(this.pictureBox4.Location.X - this.paduin.Location.X + 60, this.pictureBox4.Location.Y);
            }

            if (this.pictureBox5.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory3   = Direction.None;
                this.pictureBox5.Hide();
                this.pictureBox5.Location = new Point(this.pictureBox5.Location.X - this.paduin.Location.X + 60, this.pictureBox5.Location.Y);
            }

            if (this.pictureBox7.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory5   = Direction.None;
                this.pictureBox7.Hide();
                this.pictureBox7.Location = new Point(this.pictureBox7.Location.X - this.paduin.Location.X + 60, this.pictureBox7.Location.Y);
            }

            if (this.pictureBox8.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory6   = Direction.None;
                this.pictureBox8.Hide();
                this.pictureBox8.Location = new Point(this.pictureBox8.Location.X - this.paduin.Location.X + 60, this.pictureBox8.Location.Y);
            }

            if (this.pictureBox9.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinKnowledgeScore = this.paduinKnowledgeScore + this.jedi.PointsDamage;
                this.directionCategory7   = Direction.None;
                this.pictureBox9.Hide();
                this.pictureBox9.Location = new Point(this.pictureBox9.Location.X - this.paduin.Location.X + 60, this.pictureBox9.Location.Y);
            }

            if (this.pictureBox11.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinDrunkScore   = this.paduinDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionCategory9 = Direction.None;
                this.pictureBox11.Hide();
                this.pictureBox11.Location = new Point(822, 120);
            }

            if (this.pictureBox12.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinDrunkScore    = this.paduinDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionCategory10 = Direction.None;
                this.pictureBox12.Hide();
                this.pictureBox12.Location = new Point(822, 240);
            }
            if (this.pictureBox13.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.paduinDrunkScore    = this.paduinDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionCategory11 = Direction.None;
                this.pictureBox13.Hide();
                this.pictureBox13.Location = new Point(822, 400);
            }

            //Paduin Beer hits enemy jedi
            if (this.beerBox.Bounds.IntersectsWith(this.enemyBox.Bounds) ||
                this.beerBox.Left >= 800 || this.beerBox.Left <= 10)
            {
                this.jediDrunkScore = this.jediDrunkScore + this.jedi.KnowledgeDamage;
                this.directionBeer  = Direction.None;
                this.beerBox.Hide();
                this.beerBox.Location = new Point(412, 259);
            }

            //Paduin Beer hits enemy assistant
            if (this.beerBox.Bounds.IntersectsWith(this.pictureBox1.Bounds) ||
                this.beerBox.Left >= 800 || this.beerBox.Left <= 10)
            {
                this.assistantDrunkScore = this.assistantDrunkScore + this.assistantsJedi.AssistantAttack;
                this.directionBeer       = Direction.None;
                this.beerBox.Hide();
                this.beerBox.Location = new Point(412, 259);
            }

            //First Category
            if (this.enemyBox.Location.Y == this.pictureBox3.Location.Y)
            {
                this.pictureBox3.Visible  = true;
                this.pictureBox3.Location = new Point(this.pictureBox3.Location.X, this.pictureBox3.Location.Y);
                this.directionCategory1   = Direction.Right;
            }
            if (this.pictureBox3.Left >= 740)
            {
                this.directionCategory1 = Direction.None;
                this.pictureBox3.Hide();
                this.pictureBox3.Location = new Point(this.pictureBox3.Location.X - 720, this.pictureBox3.Location.Y);
            }

            //Second Category
            if (this.enemyBox.Location.Y == this.pictureBox4.Location.Y)
            {
                this.pictureBox4.Visible  = true;
                this.pictureBox4.Location = new Point(this.pictureBox4.Location.X, this.pictureBox4.Location.Y);
                this.directionCategory2   = Direction.Right;
            }
            if (this.pictureBox4.Left >= 740)
            {
                this.directionCategory2 = Direction.None;
                this.pictureBox4.Hide();
                this.pictureBox4.Location = new Point(this.pictureBox4.Location.X - 720, this.pictureBox4.Location.Y);
            }

            //Third Category
            if (this.enemyBox.Location.Y == this.pictureBox5.Location.Y)
            {
                this.pictureBox5.Visible  = true;
                this.pictureBox5.Location = new Point(this.pictureBox5.Location.X, this.pictureBox5.Location.Y);
                this.directionCategory3   = Direction.Right;
            }
            if (this.pictureBox5.Left >= 740)
            {
                this.directionCategory3 = Direction.None;
                this.pictureBox5.Hide();
                this.pictureBox5.Location = new Point(this.pictureBox5.Location.X - 720, this.pictureBox5.Location.Y);
            }


            //Forth Category
            if (this.enemyBox.Location.Y == this.pictureBox6.Location.Y)
            {
                this.pictureBox6.Visible  = true;
                this.pictureBox6.Location = new Point(this.pictureBox6.Location.X, this.pictureBox6.Location.Y);
                this.directionCategory4   = Direction.Right;
            }
            if (this.pictureBox6.Left >= 740)
            {
                this.directionCategory4 = Direction.None;
                this.pictureBox6.Hide();
                this.pictureBox6.Location = new Point(this.pictureBox6.Location.X - 720, this.pictureBox6.Location.Y);
            }

            //Fifth Category
            if (this.enemyBox.Location.Y == this.pictureBox7.Location.Y)
            {
                this.pictureBox7.Visible  = true;
                this.pictureBox7.Location = new Point(this.pictureBox7.Location.X, this.pictureBox7.Location.Y);
                this.directionCategory5   = Direction.Right;
            }
            if (this.pictureBox7.Left >= 740)
            {
                this.directionCategory5 = Direction.None;
                this.pictureBox7.Hide();
                this.pictureBox7.Location = new Point(this.pictureBox7.Location.X - 720, this.pictureBox7.Location.Y);
            }

            //Sixth Category
            if (this.enemyBox.Location.Y == this.pictureBox8.Location.Y)
            {
                this.pictureBox8.Visible  = true;
                this.pictureBox8.Location = new Point(this.pictureBox8.Location.X, this.pictureBox8.Location.Y);
                this.directionCategory6   = Direction.Right;
            }
            if (this.pictureBox8.Left >= 740)
            {
                this.directionCategory6 = Direction.None;
                this.pictureBox8.Hide();
                this.pictureBox8.Location = new Point(this.pictureBox8.Location.X - 720, this.pictureBox8.Location.Y);
            }

            //Seventh Category
            if (this.enemyBox.Location.Y == this.pictureBox9.Location.Y)
            {
                this.pictureBox9.Visible  = true;
                this.pictureBox9.Location = new Point(this.pictureBox9.Location.X, this.pictureBox9.Location.Y);
                this.directionCategory7   = Direction.Right;
            }
            if (this.pictureBox9.Left >= 740)
            {
                this.directionCategory7 = Direction.None;
                this.pictureBox9.Hide();
                this.pictureBox9.Location = new Point(this.pictureBox9.Location.X - 720, this.pictureBox9.Location.Y);
            }

            //Eight Category
            if (this.enemyBox.Location.Y == this.pictureBox10.Location.Y)
            {
                this.pictureBox10.Visible  = true;
                this.pictureBox10.Location = new Point(this.pictureBox10.Location.X, this.pictureBox10.Location.Y);
                this.directionCategory8    = Direction.Right;
            }
            if (this.pictureBox10.Left >= 740)
            {
                this.directionCategory8 = Direction.None;
                this.pictureBox10.Hide();
                this.pictureBox10.Location = new Point(this.pictureBox10.Location.X - 720, this.pictureBox10.Location.Y);
            }

            //BeerOne Category
            if (this.pictureBox1.Location.Y == this.pictureBox11.Location.Y)
            {
                this.pictureBox11.Visible  = true;
                this.pictureBox11.Location = new Point(this.pictureBox11.Location.X, this.pictureBox11.Location.Y);
                this.directionCategory9    = Direction.Left;
            }
            if (this.pictureBox11.Left <= 100)
            {
                this.directionCategory9 = Direction.None;
                this.pictureBox11.Hide();
                this.pictureBox11.Location = new Point(822, 120);
            }

            //BeerTwo Category
            if (this.pictureBox1.Location.Y == this.pictureBox12.Location.Y)
            {
                this.pictureBox12.Visible  = true;
                this.pictureBox12.Location = new Point(this.pictureBox12.Location.X, this.pictureBox12.Location.Y);
                this.directionCategory10   = Direction.Left;
            }
            if (this.pictureBox12.Left <= 100)
            {
                this.directionCategory10 = Direction.None;
                this.pictureBox12.Hide();
                this.pictureBox12.Location = new Point(822, 240);
            }
            //BeerThree Category
            if (this.pictureBox1.Location.Y == this.pictureBox13.Location.Y)
            {
                this.pictureBox13.Visible  = true;
                this.pictureBox13.Location = new Point(this.pictureBox13.Location.X, this.pictureBox13.Location.Y);
                this.directionCategory11   = Direction.Left;
            }
            if (this.pictureBox13.Left <= 100)
            {
                this.directionCategory11 = Direction.None;
                this.pictureBox13.Hide();
                this.pictureBox13.Location = new Point(822, 400);
            }

            //Paduins Direction
            this.PaduinDirectionsMethod();

            //Category direction - only Right
            this.CategoriesDirectionMethod();

            //Jedi Character direction - only Up and Down
            this.JediDirectionsMethod();

            //Assistant direction - only Up and Down
            this.AssistantDirectionsMethod();

            //Beer direction
            if (this.directionBeer == Direction.Right)
            {
                beerBox.Left += 5;
            }
            else if (this.directionBeer == Direction.Left)
            {
                beerBox.Left -= 5;
            }

            Invalidate();
        }