Exemple #1
0
 public Anaform(Oyuncu aktifoyuncu, Oyun o)
 {
     InitializeComponent();
     o.Id = aktifoyuncu.OyuncuID;
     this.islem.Oyuncu      = aktifoyuncu;
     this.islem.AktifOyuncu = o;
     o.Id        = aktifoyuncu.OyuncuID;
     label1.Text = islem.Oyuncu.KullaniciAdi;
 }
Exemple #2
0
 public gameoverPB(Oyuncu oyuncu, Oyun oyun)
 {
     InitializeComponent();
     kazandınızGrupBox.Visible = false;
     oyun.Id               = oyuncu.OyuncuID;
     isl.Oyuncu            = oyuncu;
     isl.AktifOyuncu       = oyun;
     label3.Text           = isl.Oyuncu.KullaniciAdi;
     isl.AktifOyuncu.Tarih = DateTime.Now;
 }
Exemple #3
0
 public İslemler(Oyuncu oyuncu, Oyun aktifOyuncu)
 {
     this.Oyuncu      = oyuncu;
     this.AktifOyuncu = aktifOyuncu;
 }
Exemple #4
0
      private void Btn_Click(object sender, EventArgs e)
      {
          atisHakkiLabel.Text = atisHakki.ToString();
          if (atisHakki != 0)
          {
              btn = (Button)sender;
              y   = btn.Top / 36;
              x   = btn.Left / 36;
              if (btn.Top == 3)
              {
                  y = 0;
              }

              if (btn.Left == 3)
              {
                  x = 0;
              }

              if (alan[x, y] != 0)
              {
                  ekran[x, y] = 'X';
                  sayac++;
                  skor += 100;
              }
              else
              {
                  ekran[x, y] = 'Q';
                  atisHakki--;
                  skor -= 20;
              }

              if (ekran[x, y] == 'X')
              {
                  btn.BackColor = Color.Transparent;
                  btn.Image     = ımageList1.Images[7];

                  path = @"C:\Users\lenovo\Downloads\Sound effects\sesler(wav)\başarılıAtış.wav";
                  player.SoundLocation = path;
              }

              else
              {
                  path = @"C:\Users\lenovo\Downloads\Sound effects\sesler(wav)\boşAtış.wav";
                  player.SoundLocation = path;
              }



              if (sayac == 20)
              {
                  player.Stop();
                  path = @"C:\Users\lenovo\Downloads\Sound effects\sesler(wav)\winner.wav";
                  player.SoundLocation      = path;
                  atis.Visible              = false;
                  atisHakkiLabel.Visible    = false;
                  sesAcPB.Visible           = false;
                  puanLabel.Text            = skor.ToString();
                  seskapat.Visible          = false; gameover.Visible = false;
                  kazandınızGrupBox.Visible = true;
              }

              if (atisHakki == 0 && sayac != 20)
              {
                  seskapat.Visible          = false;
                  atis.Visible              = false;
                  sesAcPB.Visible           = false;
                  this.BackColor            = Color.Black;
                  pictureBox2.Visible       = false;
                  atisHakkiLabel.Visible    = false;
                  sesAcPB.Visible           = false;
                  puanLabel.Text            = skor.ToString();
                  kazandınızGrupBox.Visible = true;
                  player.Stop();
                  path = @"C:\Users\lenovo\Downloads\Sound effects\sesler(wav)\gameOver.wav";
                  player.SoundLocation = path;



                  Oyun yeniOyun = new Oyun(isl.Oyuncu.OyuncuID, skor, DateTime.Now);
                  isl.SkorEkle(yeniOyun);
              }
          }
      }
Exemple #5
0
 public Skorlar(Oyun aktif)
 {
     InitializeComponent();
     this.i.AktifOyuncu = aktif;
 }