Esempio n. 1
0
        static private string GetAanvalSound(SchaakSpel.Type type)
        {
            valid = true;
            switch (type)
            {
            case SchaakSpel.Type.Konigin:
                return(RetrieveSoundLocation("KoninginAanval"));

            case SchaakSpel.Type.Pion:
                return(RetrieveSoundLocation("PionAanval"));

            case SchaakSpel.Type.Koning:
                return(RetrieveSoundLocation("KoningAanval"));

            case SchaakSpel.Type.Loper:
                return(RetrieveSoundLocation("LoperAanval"));

            case SchaakSpel.Type.Toren:
                return(RetrieveSoundLocation("TorenAanval"));

            default:
                valid = false;
                return(null);
            }
        }
Esempio n. 2
0
        static private string GetLoopSound(SchaakSpel.Type type)
        {
            valid = true;
            switch (type)
            {
            case SchaakSpel.Type.Toren:
                return(RetrieveSoundLocation("TorenLoop"));

            case SchaakSpel.Type.Paard:
                return(RetrieveSoundLocation("PaardLoop"));

            case SchaakSpel.Type.Konigin:
                return(RetrieveSoundLocation("KoninginLoop"));

            case SchaakSpel.Type.Pion:
                return(RetrieveSoundLocation("Pionloop"));

            case SchaakSpel.Type.Koning:
                return(RetrieveSoundLocation("KoningLoop"));

            default:
                valid = false;
                return(null);
            }
        }
        static private Image GetFightImage(SchaakSpel.Type type)
        {
            switch (type)
            {
            case SchaakSpel.Type.Pion:
                return(RetrieveGif("punch"));

            case SchaakSpel.Type.Toren:
                return(RetrieveGif("Kanon2"));

            case SchaakSpel.Type.Paard:
                return(RetrieveGif("Paard"));

            case SchaakSpel.Type.Loper:
                return(RetrieveGif("slice"));

            case SchaakSpel.Type.Konigin:
                return(RetrieveGif("Koiniging"));

            case SchaakSpel.Type.Koning:
                return(RetrieveGif("Koning"));

            default:
                MessageBox.Show("Image not found");
                return(null);
            }
        }
Esempio n. 4
0
 static public void PlayAanvalSound(SoundPlayer player, SchaakSpel.Type type)
 {
     GetAanvalSound(type);
     if (valid)
     {
         player.SoundLocation = GetAanvalSound(type);
         player.Play();
         Stopwatch stopWatch = new Stopwatch();
         stopWatch.Start();
         while (stopWatch.ElapsedMilliseconds < 4000)
         {
         }
         ;
         player.Stop();
         stopWatch.Stop();
     }
 }
        static private Image GetImage(SchaakSpel.Type type, SchaakSpel.Kleur kleur)
        {
            Image afbeelding;

            switch (type)
            {
            case SchaakSpel.Type.Pion:
                if (kleur == SchaakSpel.Kleur.Wit)
                {
                    afbeelding = PionWit;
                }
                else
                {
                    afbeelding = PionZwart;
                }
                break;

            case SchaakSpel.Type.Toren:
                if (kleur == SchaakSpel.Kleur.Wit)
                {
                    afbeelding = TorenWit;
                }
                else
                {
                    afbeelding = TorenZwart;
                }
                break;

            case SchaakSpel.Type.Paard:
                if (kleur == SchaakSpel.Kleur.Wit)
                {
                    afbeelding = PaardWit;
                }
                else
                {
                    afbeelding = PaardZwart;
                }
                break;

            case SchaakSpel.Type.Loper:
                if (kleur == SchaakSpel.Kleur.Wit)
                {
                    afbeelding = LoperWit;
                }
                else
                {
                    afbeelding = LoperZwart;
                }
                break;

            case SchaakSpel.Type.Konigin:
                if (kleur == SchaakSpel.Kleur.Wit)
                {
                    afbeelding = KoniginWit;
                }
                else
                {
                    afbeelding = KoniginZwart;
                }
                break;

            case SchaakSpel.Type.Koning:
                if (kleur == SchaakSpel.Kleur.Wit)
                {
                    afbeelding = KoningWit;
                }
                else
                {
                    afbeelding = KoningZwart;
                }
                break;

            default:
                return(null);
            }
            afbeelding.RotateFlip(RotateFlipType.Rotate180FlipNone);
            return(afbeelding);
        }
 static public void LoadFightAnimatie(SchaakSpel.Type type, Point punt, PictureBox pbox)
 {
 }
Esempio n. 7
0
 public SchaakStuk(SchaakSpel.Type Type, SchaakSpel.Kleur Kleur, Point Locatie)
 {
     type    = Type;
     kleur   = Kleur;
     locatie = Locatie;
 }