Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
Bul Karayı Al Parayı
#1
   

OYUN KODLARI:
PHP Kod:
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 
WindowsFormsApplication2
{
 
   public partial class Form1 Form
    
{
 
       public Form1()
 
       {
 
           InitializeComponent();
 
       }


 
       void bul()
 
       {
 
           int a r.Next(3);
 
           if (== 0)
 
           {
 
               button2.BackColor Color.Black;
 
               button3.BackColor Color.Red;
 
               button4.BackColor Color.Red;
 
           }
 
           else if (== 1)
 
           {
 
               button2.BackColor Color.Red;
 
               button3.BackColor Color.Black;
 
               button4.BackColor Color.Red;
 
           }
 
           else if (== 2)
 
           {
 
               button2.BackColor Color.Red;
 
               button3.BackColor Color.Red;
 
               button4.BackColor Color.Black;
 
           }
 
       }

 
       Random r = new Random();
 
       int puan 0;
 
       private void button1_Click(object senderEventArgs e)
 
       {
 
           label2.Visible true;
 
           button1.Visible false;
 
           button2.Visible true;
 
           button3.Visible true;
 
           button4.Visible true;
 
           button2.BackColor Color.Green;
 
           button3.BackColor Color.Green;
 
           button4.BackColor Color.Green;
 
           label1.Text "";
 
       }
 
       private void button2_Click(object senderEventArgs e)
 
       {
 
           bul();
 
           if (button2.BackColor == Color.Black)
 
           {
 
               label1.Text "Tebrikler";
 
               puan += 10;
 
               label2.Text "Puan: " puan;
 
           }
 
           else
            
{
 
               label1.Text "Üzgünüz";
 
               label2.Text "Puan: " puan;
 
           }
 
           button1.Visible true;
 
       }

 
       private void button3_Click(object senderEventArgs e)
 
       {
 
           bul();
 
           if (button3.BackColor == Color.Black)
 
           {
 
               label1.Text "Tebrikler";
 
               puan += 10;
 
               label2.Text "Puan: " puan;
 
           }
 
           else
            
{
 
               label1.Text "Üzgünüz";
 
               label2.Text "Puan: " puan;
 
           }
 
           button1.Visible=true;
 
       }

 
       private void button4_Click(object senderEventArgs e)
 
       {
 
           bul();
 
           if (button4.BackColor == Color.Black)
 
           {
 
               label1.Text "Tebrikler";
 
               puan += 10;
 
               label2.Text "Puan: " puan;
 
           }
 
           else
            
{
 
               label1.Text "Üzgünüz";
 
               label2.Text "Puan: " puan;
 
           }
 
           button1.Visible=true;
 
       }
 
   }

Ara
Cevapla


Hızlı Menü:


Konuyu Okuyanlar: 1 Ziyaretçi

Dikkat
    Teknolty.com bu sitede paylaşılan içeriklerden sorumlu tutulamaz.