How to use bitmap

Would someone explain to me how to use bitmap. I have a video game I am working on so I added images using resourcesrx and wanted to use bitmap to display where they will appear on form1. I saved the image as player.

help for my code1

Hi, I've been suffering with my magic the gathering c++ code. Here's the problem;
I make combat between two cards and after the fight, opponent's HP will be reduce. So far, the HP reduces in side the classes but when we call the player's HP, it doesn't change as in the classes.
What I can add to change the value throughout the program?

help for my code

  1. Combat between two creature cards: Reduce the defending creatures HP by the attack power of the attacking creature card AND reduce the attacking creatures HP by the attack power of the defending creature card. If either the attacker or the defender or both of them is/are reduced to 0 HP or lower these creatures are destroyed.
    Special abilities:
    a. If the attacking creature has Trample ability, the excess amount of attack power is dealt to the opposing player (which can cause the opposing player dying). Here the excess amount of attack power is calculated as:
    Excess attack power = Attackers attack power defenders HP
    b. If the attacking creature has First Strike ability,
    i. If the defending creature also has First Strike ability, normal attack procedure.
    ii. If the defending creature does NOT have First Strike ability; then first the Attackers attack power is applied to the defenders HP. If the defender is destroyed then the combat stops here (i.e., the defender CANNOT deal its damage to the attacker)
    c. If the attacking creature does NOT have First Strike ability,
    i. If the defending creature has First Strike ability, then first the Defenders attack power is
    applied to the attackers HP. If the attacker is destroyed then the combat stops here (i.e., the
    attacker CANNOT deal its damage to the defender)
    ii. If the defending creature also does NOT have First Strike ability; normal attack procedure.
  2. Combat between one creature card and the opposing player: Reduce the HP of the opposing player by the attack power of the attacking creature card. If the opposing players HP is reduced to 0 or lower, that player loses the game.

magicthegathering

Can anyone help me to write combat class?

  1. Combat between two creature cards: Reduce the defending creatures HP by the attack power of the attacking creature card AND reduce the attacking creatures HP by the attack power of the defending creature card. If either the attacker or the defender or both of them is/are reduced to 0 HP or lower these creatures are destroyed.
    ------Special abilities:
    a. If the attacking creature has Trample ability, the excess amount of attack power is dealt to the opposing player (which can cause the opposing player dying). Here the excess amount of attack power is calculated as:
    Excess attack power = Attackers attack power defenders HP
    b. If the attacking creature has First Strike ability,
    i. If the defending creature also has First Strike ability, normal attack procedure.
    ii. If the defending creature does NOT have First Strike ability; then first the Attackers attack power is applied to the defenders HP. If the defender is destroyed then the combat stops here (i.e., the defender CANNOT deal its damage to the attacker)
    c. If the attacking creature does NOT have First Strike ability,
    i. If the defending creature has First Strike ability, then first the Defenders attack power is
    applied to the attackers HP. If the attacker is destroyed then the combat stops here (i.e., the
    attacker CANNOT deal its damage to the defender)
    ii. If the defending creature also does NOT have First Strike ability; normal attack procedure.
  2. Combat between one creature card and the opposing player: Reduce the HP of the opposing player by the attack power of the attacking creature card. If the opposing players HP is reduced to 0 or lower, that player loses the game.

magic the gathering

Hi guys! I am currently using c++ and I wanted to start doing basics of a game with oop. And I thought MGT would be good. So, the problem is idk where to start with. I'm planning to use only Land, Creature, Enchantment and, Sorcery cards. so is there any help to find how to start?
-you know hardest part is the beginning-

Quality Sense Podcast: Simon Prior – #MakeATester

In this Quality Sense episode, our host Federico has the pleasure of interviewing Simon Prior, who has worked across the cyber security, Retail, gaming and airline industries. Simon is a passionate software quality leader, advocate of the importance of teaching testing at universities and co-host of the Testing Peers podcast.

Episode Highlights

  • How Simon got started in his testing career and why
  • Why universities don’t teach the top skills needed in software testing (hint, the most critical ones aren’t technical!)
  • How to help form more potential testing candidates and widen the talent pool 
  • What to look for when hiring a tester with no experience?


Strange (Pun2) RPC Problem. (With Error msg that doesn’t show up on google

Hi all,

I'm getting a strange error every time I try to send a score update using an rpc using Photon Unity Networking (And Unity3d).

Here is the Error.

RPC method 'RPC_SendScore(String, Single)' found 2x on object with PhotonView 1201. Only one component should implement it.Return type must be void or IEnumerator (if you enable RunRpcCoroutines).

UnityEngine.Debug:LogErrorFormat (UnityEngine.Object,string,object[])

Photon.Pun.PhotonNetwork:ExecuteRpc (ExitGames.Client.Photon.Hashtable,Photon.Realtime.Player) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:651)

Photon.Pun.PhotonNetwork:RPC (Photon.Pun.PhotonView,string,Photon.Pun.RpcTarget,Photon.Realtime.Player,bool,object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1275)

Photon.Pun.PhotonNetwork:RPC (Photon.Pun.PhotonView,string,Photon.Pun.RpcTarget,bool,object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2847)

Photon.Pun.PhotonView:RPC (string,Photon.Pun.RpcTarget,object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:678)

SubHealthManager:SubDeath () (at Assets/_Scripts/PlayerControllers/SubHealthManager.cs:141)

SubHealthManager:TakeDamage (single) (at Assets/_Scripts/PlayerControllers/SubHealthManager.cs:116)

SubHealthManager:ImpactDamage (UnityEngine.Collision) (at Assets/_Scripts/PlayerControllers/SubHealthManager.cs:100)

SubHealthManager:OnCollisionEnter (UnityEngine.Collision) (at Assets/_Scripts/PlayerControllers/SubHealthManager.cs:88)

Here is the section of the code that deals with the 'death' - from TakeDamage(), ImpactDamage() sends variable to TakeDamage() to update the values of the player and supposed to send the information to every other player. (This get's called when the player health hits zero, it works find 'locally')

public void SubDeath()
   {
       float damage = 5f;
       rbGravity.useGravity = true;
       playerControllerMK.SetActive(false);
       playerControllerController.SetActive(false);
       playerFiringController.SetActive(false);
       adjustedOverLoad = (overloadCounter * overloadRecoveryTime);
       isDead = true;
       //ScoringManager.Instance.UpdateScores(teamName, damage);
       if (PV.IsMine)
       {
           Debug.Log("PV Is Mine, I should send S*** now");
           PV.RPC("RPC_SendScore", RpcTarget.All, teamName, damage);
       }
   }

   [PunRPC]
   void RPC_SendScore(string teamName, float damage)
   {
       ScoringManager.Instance.UpdateScores(teamName, damage);
   }

And here is the section of the Score Manager which updates the scores etc. that the RPC is (trying) to send information to.

[

    public void UpdateScores(string teamName, float scoreReceived)
       {
           if(teamName == "SMC Retrieval Team")
           {
               pscScoreCounter -= scoreReceived;
               if (pscScoreCounter <= 0)
               {
                   pscScoreCounter = 0;
               }
               if (pscScoreCounter >= 100)
               {
                   pscScoreCounter = 100;
               }
           }

           if(teamName == "Prehistoric Creatures")
           {
               smcScoreCounter -= scoreReceived;
               if (smcScoreCounter <= 0)
               {
                   smcScoreCounter = 0;
               }
               if (smcScoreCounter >= 100)
               {
                   smcScoreCounter = 100;
               }
           }

           txtSMCScoreCounter.text = smcScoreCounter.ToString();
           smcScoreBar.sizeDelta = new Vector2(smcScoreCounter * scoreBarMultiplier, scoreBarHeight);
           if (smcScoreCounter <= 0)
           {
               WinCondition("Prehistoric Creatures");
           }

           txtPSCScoreCounter.text = pscScoreCounter.ToString();
           pscScoreBar.sizeDelta = new Vector2(pscScoreCounter * scoreBarMultiplier, scoreBarHeight);

           if (pscScoreCounter <= 0)
           {
               WinCondition("SMC Retrieval Team");
           }
       }

]

I'm not really sure what's going on, but based on the error, it seems as though PUN is saying that there are two objects trying to trigger the same RPC at the same time? (not entirely sure sure though).

I get the error when there is just one player in the game as well as multiple.

Could anyone shed some light please?

Thanks
Spud

How to enforce that a game developer’s code is compatible with mine?

I need to know if there's a way (my intution tells me there isn't a fits-all solution) to accomplish this. I have in mind a Unity asset that I want to create. This asset requires that all of the developers scripts send and receive messages from my asset framework. Its important that the developer be able to just build their game without having to go explicitly inherit from my interfaces or abstract classes.

Is there a way to do this? Obviously I cannot know ahead of time what a game developer might create so they will have to implement their own implementations of said interfaces and such I was just thinking it would be great if this could be done easily...

Bounce picturebox up and down

Made progress on my game and now I need to make the second boss bounce up and down. I figured out how to make the boss go down, but once it touches the lower wall, it stops and won't bounce (move up).

        void BossMove()
        {
            if((BOSS.Top + 10) <(this.Height - BOSS.Height))
            {
                BOSS.Top += 10;
            }
            if((BOSS.Height) > 0)
            {
                BOSS.Top -= 10;
            }
        }

How to make a delay in shooting game in C# using visual studio?

Working on a video game using visual studio and I am having trouble with the sound effect when the player shoots their weapon. When the player shoots multiple times, the sound overlaps. Ive tried many things and this was my last attempt. Can someone please help me? I am stuck.

if (e.KeyCode == Keys.Space)
            {
                while(true)
                {
                    bossTimer.Stop();
                    space = true;
                    Bullet();
                    fire = new SoundPlayer("shooting.wav");
                    fire.Play();
                    bossTimer.Start();
                }

Below is my program

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace boss_fight
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        bool right, left, up, down, space, A;
        int miss = 10;//number of missiles

        void HitorMiss()
        {
            foreach (Control j in this.Controls)
            {
                foreach (Control i in this.Controls)
                {
                    if (j is PictureBox && j.Tag == "shot" || j is PictureBox && j.Tag == "missile")
                    {
                        if (i is PictureBox && i.Tag == "boss")
                        {
                            if(j.Bounds.IntersectsWith(i.Bounds))
                            {

                                if (enemyhealth.Value == 0)
                                {
                                    PictureBox bullet = new PictureBox();
                                    bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                                    bullet.Image = Properties.Resources.Shoot;
                                    bullet.BackColor = System.Drawing.Color.Transparent;
                                    ((PictureBox)j).Image = Properties.Resources.explosion;
                                }
                                else
                                    enemyhealth.Value -= 10;
                            }
                        } 
                    }
                }
                if (Player.Bounds.IntersectsWith(e1laser.Bounds))//Player loses health when hit by boss laser
                {
                    if (healthbar.Value == 0)
                    {
                        PictureBox bullet = new PictureBox();
                        bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                        bullet.Image = Properties.Resources.Shoot;
                        bullet.BackColor = System.Drawing.Color.Transparent;
                        ((PictureBox)Player).Image = Properties.Resources.explosion;
                    }
                    else
                        healthbar.Value -= 10;
                }
            }
        }
        void Shot()//positions where players laser shows on the screen
        {
            PictureBox ammo = new PictureBox();
            ammo.SizeMode = PictureBoxSizeMode.AutoSize;
            ammo.Image = Properties.Resources.Shoot;
            ammo.BackColor = System.Drawing.Color.Transparent;
            ammo.Tag = "shot";
            ammo.Left = Player.Left + 100;//moves bullet left or right
            ammo.Top = Player.Top + 55;//55 is perfect
            this.Controls.Add(ammo);
            ammo.BringToFront();
        }
        void MoveShot()
        {
            foreach (Control x in this.Controls)
            {
                if (x is PictureBox && x.Tag == "shot")
                {
                    x.Left += 100;//x.Top -= 10;
                    if (x.Top > 900)//<100
                    {
                        this.Controls.Remove(x);
                    }
                }
            }
            shoot.Left -= 30;
            e1laser.Left -= 30;
            if (e1laser.Left < 0)
            {
                e1laser.Left = BOSS.Left;
                e1laser.Top = BOSS.Top + 25;
            }

            zmissile1.Left = zmissile1.Left -= 100;
            zmissile1.Top = zmissile1.Top - 100;
            if(zmissile1.Left < 0)
            {
                zmissile1.Left = BOSS.Left;
                zmissile1.Top = BOSS.Top + 10;//+10
            }
            zmissile2.Left -= 100;
            if(zmissile2.Left < 0)
            {
                zmissile2.Left = BOSS.Left;
                zmissile2.Top = BOSS.Top + 50;//+10
            }
            zmissile3.Left = zmissile3.Left -= 100;
            zmissile3.Top = zmissile3.Top + 100;
            if (zmissile3.Left < 0)
            {
                zmissile3.Left = BOSS.Left;
                zmissile3.Top = BOSS.Top + 70;//+10
            }
        }

        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = false;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = false;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = false;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = false;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = false;
            }
            if (e.KeyCode == Keys.A)
            {
                A = false;
            }
        }
        void Playermovement()
        {
            if (right == true)
            {
                if (Player.Left < 900)
                {
                    Player.Left += 20;
                }
            }
            if (left == true)
            {
                if (Player.Left > 5)
                {
                    Player.Left -= 15;
                }
            }
            if (up == true)
            {
                if (Player.Top > 20)
                {
                    Player.Top -= 20;
                }
            }
            if (down == true)
            {
                if (Player.Top < 550)
                {
                    Player.Top += 20;
                }
            }
        }
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = true;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = true;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = true;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = true;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = true;
                Shot();
            }

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            Playermovement();
            MoveShot();
            HitorMiss();

        }
    }
}

C# scrolling game help

Learning C# and I am working on a C# scrolling shooting game. The game works so far but when the player finishes a level, I want the enemies to appear on the far right of the screen and the player on the left of the screen. When the level is finished neither the enemies or the player appear. Can someone please help me?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Media;
using WMPLib;
namespace Macross_mod_8
{
    public partial class Game : Form
    {
        WindowsMediaPlayer win = new WindowsMediaPlayer();
        WindowsMediaPlayer Roy = new WindowsMediaPlayer();
        WindowsMediaPlayer Rick = new WindowsMediaPlayer();
        WindowsMediaPlayer squad = new WindowsMediaPlayer();
        WindowsMediaPlayer alien = new WindowsMediaPlayer();
        WindowsMediaPlayer fly = new WindowsMediaPlayer();
        playerclass pc = new playerclass();
        LevelClass lc = new LevelClass();
        private SoundPlayer pl = new SoundPlayer();
        private SoundPlayer fire;
        private SoundPlayer transform;
        private SoundPlayer victory;
        //private SoundPlayer dead;
        private SoundPlayer theme = new SoundPlayer();
        int num = 0;//used to count images for imagelist
        int no = 0;//used to count images for imagelist
        bool right, left, up, down, space, Z, X, C, A;
        int score;//this will run as long as the player has lives and doesn't die
        int fscore;
        int kills;//how many enemies player killed in the game
        int miss = 10;// number of missiles player has
        int m = 0;//Counts how many missiles have been used by the player
        int i = 0;//used for healing square
        int xp = 0;//number used to count for explosions
        private int _ticks;// You use a private variable when you want to do some sort of validation 
        //before setting the property, or basically abstract away what is happening inside your 
        //class with regards to that property

        private int nlevel;//This wil show what level the player is on
        private int endlevel;//this will count off the time from victory song and the player sprite reaches far right wall

        Random rnd = new Random();
        private int objwidth;
        private const int objheight = 50;
        private int objx, objy;//position
        private int volx, voly;//velocity
        public Game()
        {
            InitializeComponent();
            armouredPlayer.Visible = false;
            playersuper.Visible = false;
            walking.Visible = true;
            shooting.Visible = true;
            //this.theme.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 8\Macross mod 8\bin\Debug\Robotech Theme.wav";
            this.theme.PlayLooping();
            lblchoose.Visible = true;
            lblready.Visible = false;
            lblgo.Visible = false;
            lblgameover.Visible = false;
            lblyoukilled.Visible = false;
            lblkilled.Visible = false;
            lblenemies.Visible = false;
            lblready.Visible = false;
            lblgo.Visible = false;
            lblfinalpoints.Visible = false;
            //lblfinalscore.Visible = false;
            lblscoreforlevel.Visible = false;
            enemyhealth.Visible = false;
            lblbosshealth.Visible = false;
            GameTimer.Stop();
            kills++;
            mplayer.Visible = false;
            e9laser.Visible = false;
            powerarmour.Visible = false;
            zmissile1.Visible = false;
            zmissile2.Visible = false;
            zmissile3.Visible = false;
            lblscore.Visible = true;
            officers.Visible = false;
            level1.Visible = true;
            level2.Visible = false;
            level3.Visible = false;
        }
        void GameScore()
        {
            score++;
            lblscore.Text = "" + score;
        }
        void AutoMovePlayer()
        {
            //This will move the player across the screen after the boss is beaten
            //lblscore = lblfinalscore;
            endlevel++;
            GameTimer.Enabled = true;
            enemyhealth.Visible = false;
            lblbosshealth.Visible = false;
            playersuper.Left = playersuper.Left + 20;
            if (playersuper.Left >= 1400)
            {
                enemyhealth.Visible = false;
                lblbosshealth.Visible = false;
                lblfinalpoints.Visible = true;
                GameTimer.Enabled = false;
                lblscoreforlevel.Visible = true;
                lblfinalpoints.Text = "" + score;//displays current score
            }
            armouredPlayer.Left = armouredPlayer.Left + 20;
            if(armouredPlayer.Left > 1400)
            {
                enemyhealth.Visible = false;
                lblbosshealth.Visible = false;
                lblfinalpoints.Visible = true;
                GameTimer.Enabled = false;
                lblscoreforlevel.Visible = true;
                lblfinalpoints.Text = "" + score;//displays current score
            }
            /*
            if(endlevel > 250 && armouredPlayer.Visible || endlevel > 250 && playersuper.Visible)
            {
                mplayer.close();
                //NextLevel();//
            }
            */
        }
        private void finaletimer_Tick(object sender, EventArgs e)
        {
            if (enemyhealth.Value <= 0)
            {
                bouncingtimer.Stop();
                lblkilled.Text = "" + kills;//shows how many enemies player killed
                AutoMovePlayer();
            }
        }
        void GameLevel()
        {
            if (lc.nlevel > 0)
                lc.nlevel -= 1;
            if(lc.nlevel == 2)
            {
                level1.Visible = true;
                level2.Visible = true;
                level3.Visible = false;
            }
            if(lc.nlevel == 1)
            {
                level1.Visible = true;
                level2.Visible = true;
                level3.Visible = true;

            }
        }
        void Lives()
        {
            if (pc.Plives > 0)
                pc.Plives -= 1;
            if (pc.Plives == 3)
            {
                life1.Visible = true;
                life2.Visible = true;
                life3.Visible = true;            }
            else if (pc.Plives == 2)
            {
                life1.Visible = false;
                life2.Visible = true;
                life3.Visible = true;
                ResetGameAfterDeath();
                //RandomQuotes();
            }
            else if (pc.Plives == 1)
            {
                life1.Visible = false;
                life2.Visible = false;
                life3.Visible = true;
                ResetGameAfterDeath();
                //RandomQuotes();
            }
            else if (pc.Plives == 0)
            {
                life1.Visible = false;
                life2.Visible = false;
                life3.Visible = false;
                mplayer.close();
            }
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            lblready.Visible = false;
            lblgo.Visible = false;
            timer1.Enabled = false;
        }
        void NextLevel()
        //When player dies enemies reset to x1300 and will randomlly be placed between y30 to y560
        {
            //GameTimer.Start();
            //GameTimer.Enabled = true;
            int a, b, c, d, e, f, g, h;
            //armouredPlayer.Location = new Point(0, 250); //(-100, -300);
            //playersuper.Location = new Point(0, 250);
            a = rnd.Next(30, 560);
            b = rnd.Next(30, 560);
            c = rnd.Next(30, 560);
            d = rnd.Next(30, 560);
            e = rnd.Next(30, 560);
            f = rnd.Next(30, 560);
            g = rnd.Next(30, 560);
            h = rnd.Next(30, 560);
            e1.Location = new Point(1300, a);
            e2.Location = new Point(1300, b);
            e3.Location = new Point(1300, c);
            e4.Location = new Point(1300, d);
            e5.Location = new Point(1300, e);
            e6.Location = new Point(1300, f);
            e7.Location = new Point(1300, g);
            e8.Location = new Point(1300, h);
            lblready.Visible = false;
            lblgo.Visible = false;
        }
        void ResetGameAfterDeath()
        //When player dies enemies reset to x1300 and will randomlly be placed between y30 to y560
        {
            int a, b, c, d, e, f, g, h;
            armouredPlayer.Location = new Point(0, 250); //(-100, -300);
            playersuper.Location = new Point(0, 250);
            a = rnd.Next(30, 560);
            b = rnd.Next(30, 560);
            c = rnd.Next(30, 560);
            d = rnd.Next(30, 560);
            e = rnd.Next(30, 560);
            f = rnd.Next(30, 560);
            g = rnd.Next(30, 560);
            h = rnd.Next(30, 560);
            e1.Location = new Point(1300, a);
            e2.Location = new Point(1300, b);
            e3.Location = new Point(1300, c);
            e4.Location = new Point(1300, d);
            e5.Location = new Point(1300, e);
            e6.Location = new Point(1300, f);
            e7.Location = new Point(1300, g);
            e8.Location = new Point(1300, h);
            lblready.Visible = true;
            lblgo.Visible = true;
            //mad.Visible = true;
            //RandomQuotes();
            timer1.Interval = 1000;
            timer1.Enabled = true;
        }
        void HitorMiss()
        //function handles collision with enemies, player shooting and hitting enemies
        //enemies hitting player, player touches heal symbol and player death
        {
            foreach (Control j in this.Controls)
            {
                if (j is PictureBox && (j.Tag == "bullet" || j.Tag == "missile"))
                {
                    foreach (Control i in Controls)
                    {
                        if (i is PictureBox && i.Tag == "boss")
                        {
                            if (j.Bounds.IntersectsWith(i.Bounds))
                            {
                                if (enemyhealth.Value <= 0)
                                {
                                    i.Top = -750;
                                    mplayer.close();
                                    PictureBox shoot = new PictureBox();
                                    shoot.SizeMode = PictureBoxSizeMode.AutoSize;
                                    shoot.Image = Properties.Resources.Shoot;
                                    shoot.BackColor = System.Drawing.Color.Transparent;
                                    ((PictureBox)j).Image = Properties.Resources.explosion;
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    playersuper.Location = new Point(0, 250);
                                    PictureBox fighter = new PictureBox();
                                    fighter.SizeMode = PictureBoxSizeMode.StretchImage;
                                    fighter.Image = Properties.Resources.fighter;
                                    fighter.BackColor = System.Drawing.Color.Transparent;
                                    ((PictureBox)playersuper).Image = Properties.Resources.fighter;
                                    transform = new SoundPlayer("transforming.wav");
                                    transform.Play();
                                    nmissiles.Visible = false;
                                    healthup.Visible = false;
                                    enemyhealth.Visible = false;
                                    lblbosshealth.Visible = false;
                                    victory = new SoundPlayer("victory.wav");
                                    victory.Play();
                                    fly.URL = "gundam_soaring_by.mp3";
                                    fly.controls.play();
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    GameScore();
                                    GameLevel();
                                    powerarmour.Visible = false;
                                    e9laser.Visible = false;
                                    powerarmour.Location = new Point(-250, -50);//
                                    e9laser.Location = new Point(-150, 50);  //(1250,50);
                                    boom.Visible = false;
                                    boom1.Visible = false;
                                    boom2.Visible = false;
                                    boom3.Visible = false;
                                    boom4.Visible = false;
                                    boom5.Visible = false;
                                    lblyoukilled.Visible = true;
                                    lblkilled.Visible = true;
                                    lblenemies.Visible = true; 
                                }
                                else
                                    enemyhealth.Value -= 5;
                            }
                        }
                        //if (i is PictureBox && i.Tag == "enemies")
                        if (i is PictureBox && (i.Tag == "enemies" || i.Tag == "zmissile"))
                        {
                            if (j.Bounds.IntersectsWith(i.Bounds))
                            {
                                i.Top = -750;//100;
                                PictureBox bullet = new PictureBox();
                                bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                                bullet.Image = Properties.Resources.Shoot;
                                bullet.BackColor = System.Drawing.Color.Transparent;
                                ((PictureBox)j).Image = Properties.Resources.explosion;
                                kills++;
                                e8laser.Location = new Point(-150, 50);  //(1250,50);
                                //score++;//each time an enemy dies score goes up one point
                                //lblscore.Text = "" + score;//displays current score    
                            }
                        }
                    }
                }
            }
            if (armouredPlayer.Bounds.IntersectsWith(healthup.Bounds))//heals player
            {
                healthbar.Value = 100;
            }
            if (armouredPlayer.Bounds.IntersectsWith(nmissiles.Bounds))//refills players missiles
            {
                nomissiles.ForeColor = Color.Red;
                nomissiles.Value = 100;
            }
            _ticks++;
            /*
            if(_ticks > 300)//2180
            {
                mplayer.URL = "Rick Hunter Theme.mp3";
            }
            */
            if (_ticks > 100)//2180 which is the length of we will win
            {
                //this function controls boss movement
                //BossMove();
                enemyhealth.Visible = true;
                powerarmour.Visible = true;
                lblbosshealth.Visible = true;
                e9laser.Visible = true;
                zmissile1.Visible = true;
                zmissile2.Visible = true;
                zmissile3.Visible = true;
                e1.Location = new Point(-150, 50);  //(1250,50);
                e2.Location = new Point(-150, 75);// (1250,75);
                e3.Location = new Point(-150, 180);// (1250, 100);
                e4.Location = new Point(-150, 125);// (1250,125);
                e5.Location = new Point(-150, 135);// (1250,135);
                e6.Location = new Point(-150, 140);// (1250,140);
                e7.Location = new Point(-150, 145);// (1250,145);
                e8.Location = new Point(-150, 150);
                e1laser.Visible = false;
                e2laser.Visible = false;
                e3laser.Visible = false;
                e4laser.Visible = false;
                e5laser.Visible = false;
                e6laser.Visible = false;
                e7laser.Visible = false;
                e8laser.Visible = false;
                if (playersuper.Bounds.IntersectsWith(powerarmour.Bounds) || playersuper.Bounds.IntersectsWith(e9laser.Bounds) || playersuper.Bounds.IntersectsWith(zmissile1.Bounds) || playersuper.Bounds.IntersectsWith(zmissile2.Bounds) || playersuper.Bounds.IntersectsWith(zmissile3.Bounds))
                {
                    //Player loses health when hit by boss laser or touches powerarmour body
                    if (healthbar.Value <= 0)
                    {
                        Lives();
                        healthbar.Value = 100;
                    }
                    if (pc.Plives == 0)
                    {
                        Lives();
                        GameTimer.Stop();
                        /////////////////////player.close();
                        lblgameover.Visible = true;
                        lblgameover.Text = "GAME OVER";
                        PictureBox bullet = new PictureBox();
                        bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                        bullet.Image = Properties.Resources.Shoot;
                        bullet.BackColor = System.Drawing.Color.Transparent;
                        ((PictureBox)playersuper).Image = Properties.Resources.explosion;

                        //dead = new SoundPlayer("death.wav");
                        //RandomQuotes();
                        //dead.Play();
                        this.pl.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 6\Macross mod 6\bin\Debug\Dead.wav";
                        this.pl.PlayLooping();
                    }
                    else
                    {
                        healthbar.Value -= 10;
                    }
                }
            }
            if (playersuper.Bounds.IntersectsWith(e1.Bounds) || playersuper.Bounds.IntersectsWith(e1laser.Bounds) || playersuper.Bounds.IntersectsWith(e2.Bounds) || playersuper.Bounds.IntersectsWith(e2laser.Bounds) || playersuper.Bounds.IntersectsWith(e3.Bounds) || playersuper.Bounds.IntersectsWith(e3laser.Bounds) || playersuper.Bounds.IntersectsWith(e4.Bounds) || playersuper.Bounds.IntersectsWith(e4laser.Bounds) || playersuper.Bounds.IntersectsWith(e5.Bounds) || armouredPlayer.Bounds.IntersectsWith(e5laser.Bounds) || playersuper.Bounds.IntersectsWith(e6.Bounds) || playersuper.Bounds.IntersectsWith(e6laser.Bounds) || playersuper.Bounds.IntersectsWith(e7.Bounds) || playersuper.Bounds.IntersectsWith(e7laser.Bounds) || playersuper.Bounds.IntersectsWith(e8.Bounds) || playersuper.Bounds.IntersectsWith(e8laser.Bounds))
            {
                if (healthbar.Value <= 0)
                {
                    Lives();
                    healthbar.Value = 100;
                }
                if (pc.Plives == 0)
                {
                    Lives();
                    GameTimer.Stop();
                    //bouncingtimer.Stop();
                    /////////////////////player.close();
                    lblgameover.Visible = true;
                    lblgameover.Text = "GAME OVER";
                    PictureBox bullet = new PictureBox();
                    bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                    bullet.Image = Properties.Resources.Shoot;
                    bullet.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.explosion;
                    //dead = new SoundPlayer("death.wav");
                    //RandomQuotes();
                    //dead.Play();
                    this.pl.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 6\Macross mod 6\bin\Debug\Dead.wav";
                    this.pl.PlayLooping();
                }
                else
                    healthbar.Value -= 10;
            }
            if (armouredPlayer.Bounds.IntersectsWith(e1.Bounds) || armouredPlayer.Bounds.IntersectsWith(e1laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e2.Bounds) || armouredPlayer.Bounds.IntersectsWith(e2laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e3.Bounds) || armouredPlayer.Bounds.IntersectsWith(e3laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e4.Bounds) || armouredPlayer.Bounds.IntersectsWith(e4laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e5.Bounds) || armouredPlayer.Bounds.IntersectsWith(e5laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e6.Bounds) || armouredPlayer.Bounds.IntersectsWith(e6laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e7.Bounds) || armouredPlayer.Bounds.IntersectsWith(e7laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e8.Bounds) || armouredPlayer.Bounds.IntersectsWith(e8laser.Bounds))
            {
                if (healthbar.Value <= 0)
                {
                    Lives();
                    healthbar.Value = 100;
                }
                if (pc.Plives == 0)
                {
                    Lives();
                    GameTimer.Stop();
                    //bouncingtimer.Stop();
                    /////////////////////player.close();
                    lblgameover.Visible = true;
                    lblgameover.Text = "GAME OVER";
                    PictureBox bullet = new PictureBox();
                    bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                    bullet.Image = Properties.Resources.Shoot;
                    bullet.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)armouredPlayer).Image = Properties.Resources.explosion;
                    //dead = new SoundPlayer("death.wav");
                    //RandomQuotes();
                    //dead.Play();
                    this.pl.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 6\Macross mod 6\bin\Debug\Dead.wav";
                    this.pl.PlayLooping();
                }
                else
                    healthbar.Value -= 10;
            }
        }
        void Explosion()
        {
            Random rnd = new Random();
            int a = rnd.Next(0, 1200);//690
            int b = rnd.Next(0, 650);//600
            int c = rnd.Next(0, 1200);//690
            int d = rnd.Next(0, 650);//600
            int e = rnd.Next(0, 1200);//690
            int f = rnd.Next(0, 650);//600
            int g = rnd.Next(0, 1200);//690
            int h = rnd.Next(0, 650);//600
            int i = rnd.Next(0, 1200);//690
            int j = rnd.Next(0, 650);//600
            int k = rnd.Next(0, 1200);//690
            int l = rnd.Next(0, 650);//600
            boom.Image = imageList3.Images[xp];
            boom.Location = new Point(a, b);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom1.Image = imageList3.Images[xp];
            boom1.Location = new Point(c, d);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom2.Image = imageList3.Images[xp];
            boom2.Location = new Point(e, f);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom3.Image = imageList3.Images[xp];
            boom3.Location = new Point(g, h);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom4.Image = imageList3.Images[xp];
            boom4.Location = new Point(i, j);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom5.Image = imageList3.Images[xp];
            boom5.Location = new Point(k, l);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
        }
        private void Game_KeyDown(object sender, KeyEventArgs e)
        {
            if (enemyhealth.Value == 0)
            {
                if (e.KeyCode == Keys.Right)
                {
                    right = false;
                }
                if (e.KeyCode == Keys.Left)
                {
                    left = false;
                }
                if (e.KeyCode == Keys.Up)
                {
                    up = false;
                }
                if (e.KeyCode == Keys.Down)
                {
                    down = false;
                }
                if (e.KeyCode == Keys.Space)
                {
                    space = false;
                    //Bullet();
                    //fire = new SoundPlayer("shooting.wav");
                    //fire.Play();
                }
                if (e.KeyCode == Keys.A)
                {
                    A = false;
                    //Missile();
                    if (nomissiles.Value >= 10)
                    {
                        /*
                        miss--;
                        nomissiles.Value -= 10;
                        A = false;
                        Missile();
                        */
                    }
                }
                if (e.KeyCode == Keys.P)
                    GameTimer.Stop();
                if (e.KeyCode == Keys.S)
                    GameTimer.Start();
            }
            else
            {
                if (e.KeyCode == Keys.Right)
                {
                    right = true;
                }
                if (e.KeyCode == Keys.Left)
                {
                    left = true;
                }
                if (e.KeyCode == Keys.Up)
                {
                    up = true;
                }
                if (e.KeyCode == Keys.Down)
                {
                    down = true;
                }
                if (e.KeyCode == Keys.Space)
                {
                    space = true;
                    Bullet();
                    fire = new SoundPlayer("shooting.wav");
                    fire.Play();
                }
                if (e.KeyCode == Keys.A)
                {
                    if (nomissiles.Value >= 10)
                    {
                        miss--;
                        nomissiles.Value -= 10;
                        A = true;
                        Missile();
                    }
                }
                if (e.KeyCode == Keys.Z)
                {
                    PictureBox robot = new PictureBox();
                    robot.SizeMode = PictureBoxSizeMode.AutoSize;
                    robot.Image = Properties.Resources.Bioroidd;
                    robot.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.Bioroidd;
                    transform = new SoundPlayer("transforming.wav");
                    transform.Play();
                }
                if (e.KeyCode == Keys.X)
                {
                    PictureBox gerwalk = new PictureBox();
                    gerwalk.SizeMode = PictureBoxSizeMode.AutoSize;
                    gerwalk.Image = Properties.Resources.Gurwalk;
                    gerwalk.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.Gurwalk;
                    transform = new SoundPlayer("transforming.wav");
                    transform.Play();
                }
                if (e.KeyCode == Keys.C)
                {
                    PictureBox fighter = new PictureBox();
                    fighter.SizeMode = PictureBoxSizeMode.StretchImage;
                    fighter.Image = Properties.Resources.fighter;
                    fighter.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.fighter;
                    transform = new SoundPlayer("transforming.wav");
                    transform.Play();
                }
                if (e.KeyCode == Keys.P)
                    GameTimer.Stop();
                if (e.KeyCode == Keys.S)
                    GameTimer.Start();
            }
        }
        void Enemies_move()
        {
            int a, b, c, d, e, f, g, h;
            Random rnd = new Random();
            e1.Left -= 15;// 10;//1053
            if (e1.Left < 0)
            {
                a = rnd.Next(30, 560);
                e1.Location = new Point(1300, a);
            }
            e2.Left -= 15;// 10;
            if (e2.Left < 0)
            {

                b = rnd.Next(30, 560);
                e2.Location = new Point(1300, b);
            }
            e3.Left -= 15;// 10;
            if (e3.Left < 0)//if (e3.Left < 0)
            {
                c = rnd.Next(30, 560);
                e3.Location = new Point(1300, c);
            }
            e4.Left -= 15;// 10;
            if (e4.Left < 0)
            {
                d = rnd.Next(30, 560);
                e4.Location = new Point(1300, d);
            }
            e5.Left -= 15;// 10;
            if (e5.Left < 0)
            {
                e = rnd.Next(30, 560);
                e5.Location = new Point(1300, e);
            }
            e6.Left -= 15;
            if (e6.Left < 0)
            {
                f = rnd.Next(30, 560);
                e6.Location = new Point(1300, f);
            }
            e7.Left -= 15;
            if (e7.Left < 0)
            {
                g = rnd.Next(30, 560);
                e7.Location = new Point(3200, g);
            }
            e8.Left -= 15;
            if (e8.Left < 0)
            {
                h = rnd.Next(30, 560);
                e8.Location = new Point(3200, h);
            }
        }
        void Bullet()//draws super veretech players ammo
        {
            PictureBox bullet = new PictureBox();
            bullet.SizeMode = PictureBoxSizeMode.AutoSize;
            bullet.Image = Properties.Resources.Shoot;
            bullet.BackColor = System.Drawing.Color.Transparent;
            bullet.Tag = "bullet";
            bullet.Left = playersuper.Left + 100;//moves bullet left or right
            bullet.Top = playersuper.Top + 50;//55 is perfect                    
            this.Controls.Add(bullet);
            bullet.BringToFront();
        }
        void movebullet()
        {
            foreach (Control x in this.Controls)
            {
                if (x is PictureBox && x.Tag == "bullet")
                {
                    x.Left += 100;//x.Top -= 10;
                    if (x.Top > 900)//<100
                    {
                        this.Controls.Remove(x);
                    }
                }
            }
        }
        void EnemymoveBullet()
        {//This handles the enemies shooting at player
            e1laser.Left -= 100;
            if (e1laser.Left < 0)
            {
                e1laser.Left = e1.Left;
                e1laser.Top = e1.Top + 25;
            }
            e2laser.Left -= 100;
            if (e2laser.Left < 0)
            {
                e2laser.Left = e2.Left;
                e2laser.Top = e2.Top + 25;
            }
            e3laser.Left -= 100;
            if (e3laser.Left < 0)
            {
                e3laser.Left = e3.Left;
                e3laser.Top = e3.Top + 25;
            }
            e4laser.Left -= 100;
            if (e4laser.Left < 0)
            {
                e4laser.Left = e4.Left;
                e4laser.Top = e4.Top + 25;
            }
            e5laser.Left -= 100;
            if (e5laser.Left < 0)
            {
                e5laser.Left = e5.Left;
                e5laser.Top = e5.Top + 25;
            }
            e6laser.Left -= 100;
            if (e6laser.Left < 0)
            {
                e6laser.Left = e6.Left;
                e6laser.Top = e6.Top + 25;
            }
            e7laser.Left -= 100;
            if (e7laser.Left < 0)
            {
                e7laser.Left = e7.Left;
                e7laser.Top = e7.Top + 25;
            }
            e8laser.Left -= 100;//30
            if (e8laser.Left < 0)
            {
                e8laser.Left = e8.Left;
                e8laser.Top = e8.Top + 25;//25 moves laser up and down y axis
            }
            e9laser.Left -= 100;
            if (e9laser.Left < 0)
            {
                e9laser.Left = powerarmour.Left;
                e9laser.Top = powerarmour.Top + 60;
            }
            zmissile1.Left = zmissile1.Left -= 40;
            zmissile1.Top = zmissile1.Top - 40;
            if (zmissile1.Left < 0)
            {
                zmissile1.Left = powerarmour.Left;
                zmissile1.Top = powerarmour.Top + 10;//+10
            }
            zmissile2.Left -= 40;
            if (zmissile2.Left < 0)
            {
                zmissile2.Left = powerarmour.Left;
                zmissile2.Top = powerarmour.Top + 50;//+10
            }
            zmissile3.Left = zmissile3.Left -= 40;
            zmissile3.Top = zmissile3.Top + 40;
            if (zmissile3.Left < 0)
            {
                zmissile3.Left = powerarmour.Left;
                zmissile3.Top = powerarmour.Top + 70;//+10
            }
        }
        void ArmouredMovement()
        {
            if (right == true)
            {
                if (armouredPlayer.Left < 900)
                {
                    armouredPlayer.Left += 20;
                }
            }
            if (left == true)
            {
                if (armouredPlayer.Left > 5)
                {
                    armouredPlayer.Left -= 15;
                }
            }
            if (up == true)
            {
                if (armouredPlayer.Top > 20)
                {
                    armouredPlayer.Top -= 20;
                }
            }
            if (down == true)
            {//put picture boundaries here
                if (armouredPlayer.Top < 600)
                {
                    armouredPlayer.Top += 20;
                }
            }
        }
        void SuperMovement()
        {
            if (right == true)
            {
                if (playersuper.Left < 900)
                {
                    playersuper.Left += 20;
                }
            }
            if (left == true)
            {
                if (playersuper.Left > 5)
                {
                    playersuper.Left -= 15;
                }
            }
            if (up == true)
            {
                if (playersuper.Top > 20)
                {
                    playersuper.Top -= 20;
                }
            }
            if (down == true)
            {//put picture boundaries here
                if (playersuper.Top < 650)
                {
                    playersuper.Top += 20;
                }
            }
        }
        private void Game_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = false;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = false;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = false;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = false;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = false;
            }
            if (e.KeyCode == Keys.A)
            {
                A = false;
            }
        }
        void BossMove()
        {
            //Bounces first boss up and down on screen   
            powerarmour.Left = objx;
            powerarmour.Top = objy;

            objx += volx;
            if (objx < 10)
            {
                volx = -volx;
            }
            else if (objx + objwidth > ClientSize.Width)
            {
                volx = -volx;
            }
            objy += voly;
            if (objy < 10)
            {
                voly = -voly;
            }
            else if (objy + objheight > ClientSize.Height)
            {
                voly = -voly;
            }
            Refresh();
        }
        private void bouncingtimer_Tick(object sender, EventArgs e)
        {
            BossMove();
        }



        void movemissile()//moves missile on screen
        {
            foreach (Control y in this.Controls)
            {
                if (y is PictureBox && y.Tag == "missile")
                {
                    y.Left += 100;//x.Top -= 10;
                    if (y.Top > 900)//<100
                    {
                        this.Controls.Remove(y);
                    }
                }
            }
        }
        private void Game_Load(object sender, EventArgs e)
        {
            //ModifyProgressBarColor.SetState(BHEALTH, progressBarRed);
            //textBox1.Visible = false;
            //mad.Visible = false;
            //
            Random rand = new Random();
            volx = rand.Next(1, 4);//1,4
            voly = rand.Next(1, 8);//1,4
            objx = powerarmour.Left;
            objy = powerarmour.Top;
            objwidth = powerarmour.Width;

            objx = rand.Next(0, ClientSize.Width - objwidth);
            objy = rand.Next(0, ClientSize.Height - objheight);
            this.SetStyle(
                ControlStyles.AllPaintingInWmPaint |
                //ControlStyles.UserPaint,
                ControlStyles.OptimizedDoubleBuffer, true);
            this.UpdateStyles();
        }
        void Missile()
        {
            //positions missile for player
            PictureBox m = new PictureBox();
            m.SizeMode = PictureBoxSizeMode.AutoSize;
            m.Image = Properties.Resources.Missile1;
            m.BackColor = System.Drawing.Color.Transparent;
            m.Tag = "missile";
            m.Left = playersuper.Left + 100;//moves bullet left or right
            m.Top = playersuper.Top + 10;//55 is perfect
            this.Controls.Add(m);
            m.BringToFront();
        }
        void AddMissiles()//frequency of rearmed missiles appear on screen
        {//makes missile icon appear and scroll across the screen
            Random addmiss = new Random();
            m++;
            int mi;

            nmissiles.Left -= 10;
            if (m == 100)
            {
                nmissiles.Visible = true;
                mi = addmiss.Next(50, 550);
                nmissiles.Location = new Point(1200, mi);
            }
            else if (m == 500)
                m = 0;

            foreach (Control m in this.Controls)
            {
                if (m is PictureBox && m.Tag == "MISSILES")
                {
                    if (armouredPlayer.Bounds.IntersectsWith(nmissiles.Bounds) || playersuper.Bounds.IntersectsWith(nmissiles.Bounds))
                    {
                        nmissiles.Visible = false;//this.Controls.Remove(m);
                    }
                }
            }
        }
        void Health()//Handles icon to heal player. Randomly appears in different places on screen
        {
            Random hpup = new Random();
            i++;
            int hp;
            foreach (Control h in this.Controls)
            {
                if (h is PictureBox && h.Tag == "HEAL")
                {
                    healthup.Left -= 10;
                    if (armouredPlayer.Bounds.IntersectsWith(healthup.Bounds) || (playersuper.Bounds.IntersectsWith(healthup.Bounds)))
                    {
                        healthup.Visible = false;
                    }
                    if (i == 100 && healthup.Left < 0)// i == 100
                    {
                        healthup.Visible = true;
                        hp = hpup.Next(50, 500);
                        healthup.Location = new Point(1200, hp);
                    }
                    if (i == 500)
                    {
                        i = 0;
                    }
                }
            }
        }
        void Start()
        {
            walking.Image = imageList1.Images[num];
            if (num == imageList1.Images.Count - 1)
            {
                num = 0;
            }
            else
                num++;

            shooting.Image = imageList2.Images[no];
            if (no == imageList2.Images.Count - 1)
            {
                no = 0;
            }
            else
                no++;
        }
        private void Armoured_Click(object sender, EventArgs e)
        {
            lblchoose.Visible = false;
            armouredPlayer.Visible = true;
            playersuper.Visible = false;
            Armoured.Visible = false;
            Super.Visible = false;
            walking.Visible = false;
            shooting.Visible = false;
            this.theme.Stop();
            //lbltitle.Visible = false;
            GameTimer.Start();
        }
        private void Super_Click(object sender, EventArgs e)
        {
            lblchoose.Visible = false;
            armouredPlayer.Visible = false;
            playersuper.Visible = true;
            Super.Visible = false;
            Armoured.Visible = false;
            walking.Visible = false;
            shooting.Visible = false;
            this.theme.Stop();
            //lbltitle.Visible = false;
            GameTimer.Start();
        }
        private void imagelisttimer_Tick(object sender, EventArgs e)
        {
            Start();
        }
        private void GameTimer_Tick(object sender, EventArgs e)
        {
            SuperMovement();
            ArmouredMovement();
            movebullet();
            movemissile();
            Health();
            AddMissiles();
            Enemies_move();
            Explosion();
            HitorMiss();
            EnemymoveBullet();
            GameScore();

        }
    }
}

Show username in chat

Hi guys, im making a chat app in C#
I can get it to show time and text but the code im using shows PC username not login username of app
Could someone please help me with the correct bit to put it
Thanks in Advance

            if (textBoxSend.Text != "")
            {
                richTextBoxChat.Text += DateTime.Now.ToString("hh:mm:ss:tt") + " :  " + System.Environment.GetEnvironmentVariable("username") + textBoxSend.Text + Environment.NewLine;
                textBoxSend.Text = "";

            }

Printing UNO game logo-python

Hey, Im working on the UNO game in python and am almost done with the rest of the code but I am not able to print the UNO logo as of yet. Please help. I need to submit my work tomorrow.