Form1.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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

namespace 百度问题_井字游戏
{
    public partial class Form1 : Form
    {
        check sb = new check();
        int[,] a = new int[3, 3] { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } };
        bool[] _被点击 = new bool[9];
        int n = 0;
        public Form1()
        {
            InitializeComponent();
        }

        // 下载于www.51aspx.com
        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (!_被点击[0])
            {
                _被点击[0] = true;
                if (n++ % 2 == 0)
                {
                    a[0, 0] = 1;
                    button1.BackgroundImage = 百度问题_井字游戏.Properties.Resources.X;
                }
                else
                {
                    a[0, 0] = 10;
                    button1.BackgroundImage = 百度问题_井字游戏.Properties.Resources._1;
                }
                sb.check1(a,_被点击);
                if(sb.O获胜)
                    MessageBox.Show("O获胜!");
                if (sb.X获胜)
                    MessageBox.Show("X获胜!");
                if(sb.平局)
                    MessageBox.Show("平局!");
            }
            else
                MessageBox.Show("此处已经下过棋了!");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (!_被点击[1])
            {
                _被点击[1] = true;
后面还有 212 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。