Notes
Notes - notes.io |
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 tombala
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Random rnd = new Random();
int tombala1 = 0; //3 adet çinko olduğunda kazananı belirlemeke için kullanılır.
int tombala2 = 0;
private void Form1_Load(object sender, EventArgs e)
{
// ilk kart için değişkenler
int a = rnd.Next(1, 101);
int b = rnd.Next(1, 101);
int c = rnd.Next(1, 101);
int d = rnd.Next(1, 101);
int f = rnd.Next(1, 101);
int g = rnd.Next(1, 101);
int h = rnd.Next(1, 101);
int i = rnd.Next(1, 101);
int j = rnd.Next(1, 101);
int k = rnd.Next(1, 101);
int l = rnd.Next(1, 101);
int m = rnd.Next(1, 101);
int n = rnd.Next(1, 101);
int o = rnd.Next(1, 101);
int p = rnd.Next(1, 101);
label3.Text = a.ToString();
label4.Text = b.ToString();
label5.Text = c.ToString();
label6.Text = d.ToString();
label7.Text = f.ToString();
label8.Text = g.ToString();
label9.Text = h.ToString();
label10.Text = i.ToString();
label11.Text = j.ToString();
label12.Text = k.ToString();
label13.Text = l.ToString();
label14.Text = m.ToString();
label15.Text = n.ToString();
label16.Text = o.ToString();
label17.Text = p.ToString();
//ikinci kart için kullanılan değişkenler
int aa = rnd.Next(1, 101);
int bb = rnd.Next(1, 101);
int cc = rnd.Next(1, 101);
int dd = rnd.Next(1, 101);
int ff = rnd.Next(1, 101);
int gg = rnd.Next(1, 101);
int hh= rnd.Next(1, 101);
int ii= rnd.Next(1, 101);
int jj = rnd.Next(1, 101);
int kk = rnd.Next(1, 101);
int ll = rnd.Next(1, 101);
int mm = rnd.Next(1, 101);
int nn = rnd.Next(1, 101);
int oo = rnd.Next(1, 101);
int pp = rnd.Next(1, 101);
label18.Text = aa.ToString();
label19.Text = bb.ToString();
label20.Text = cc.ToString();
label21.Text = dd.ToString();
label22.Text = ff.ToString();
label23.Text = gg.ToString();
label24.Text = hh.ToString();
label25.Text = ii.ToString();
label26.Text = jj.ToString();
label27.Text = kk.ToString();
label28.Text = ll.ToString();
label29.Text = mm.ToString();
label30.Text = nn.ToString();
label31.Text = oo.ToString();
label32.Text = pp.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
int cekilen = rnd.Next(1, 101);
label2.Text = cekilen.ToString();
// BİRİNCİ OYUNCU
if (label3.Text == (cekilen.ToString()))
{
label3.Text = "X";
}
if (label4.Text == (cekilen.ToString()))
{
label4.Text = "X";
}
if (label5.Text == (cekilen.ToString()))
{
label5.Text = "X";
}
if (label6.Text == (cekilen.ToString()))
{
label6.Text = "X";
}
if (label7.Text == (cekilen.ToString()))
{
label7.Text = "X";
}
if (label8.Text == (cekilen.ToString()))
{
label8.Text = "X";
}
if (label9.Text == (cekilen.ToString()))
{
label9.Text = "X";
}
if (label10.Text == (cekilen.ToString()))
{
label10.Text = "X";
}
if (label11.Text == (cekilen.ToString()))
{
label11.Text = "X";
}
if (label12.Text == (cekilen.ToString()))
{
label12.Text = "X";
}
if (label13.Text == (cekilen.ToString()))
{
label13.Text = "X";
}
if (label14.Text == (cekilen.ToString()))
{
label14.Text = "X";
}
if (label15.Text == (cekilen.ToString()))
{
label15.Text = "X";
}
if (label16.Text == (cekilen.ToString()))
{
label16.Text = "X";
}
if (label17.Text == (cekilen.ToString()))
{
label17.Text = "X";
}
if (label3.Text == label4.Text && label4.Text == label5.Text && label4.Text == label6.Text && label6.Text == label7.Text)
{
tombala1++;
MessageBox.Show("birinci oyuncu çikoooooo");
label3.Text = "çinko"; label3.BackColor = Color.Green;
}
if (label8.Text == label9.Text && label9.Text == label10.Text && label10.Text == label11.Text && label11.Text == label12.Text)
{
tombala1++;
MessageBox.Show("birinci oyuncu çinkoooo");
label8.Text = "çinko"; label8.BackColor = Color.Yellow;
}
if (label13.Text == label14.Text && label14.Text == label15.Text && label15.Text == label16.Text && label16.Text == label17.Text)
{
tombala1++;
MessageBox.Show("birinci oyuncu çinkooo");
label13.Text = "çinko"; label13.BackColor = Color.Turquoise;
}
}
}
}
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team