• 大小: 8.44MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-03
  • 语言: C#
  • 标签: C#  小游戏  源码  

资源简介

C#版2048小游戏源码,vs2012开发,适合初学者学习,研读。

资源截图

代码片段和文件信息

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

namespace WindowsFormsApplication1
{
    public partial class Form4 : Form
    {
        public Form4()
        {
            InitializeComponent();
        }

        ArrayList xnzuobiao = new ArrayList();//存储空余的坐标,例:(102102)转换成(22)存储为“22“
        int count = 0;  //计算ArrayList xnzuobiao存储的空余坐标的剩余数,随机产生一个Label时,直接从xnzuobiao中取得
        bool kaiguan = true;//开关
        bool death = false;//是否死亡
        bool fangkuai = false;//是否有方块移动

        private void Form4_Load(object sender EventArgs e)//Form的Load事件为空
        {
        }

        private void PdArray()//因有方块移动,重新整理ArrayList中的数据
        {
            xnzuobiao.Clear();
            for (int i = 1; i < 5; i++)
            {
                for (int j = 1; j < 5; j++)
                {
                    xnzuobiao.Add(i.ToString() + j.ToString());
                }
            }
            count = xnzuobiao.Count;
            foreach (Control item in this.pictureBox1.Controls.OfType

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     226358  2015-02-11 00:05  2048\WindowsFormsApplication1\WindowsFormsApplication1\2014-06-10 223015.jpg

     文件        185  2015-02-12 11:46  2048\WindowsFormsApplication1\WindowsFormsApplication1\App.config

     文件    1245184  2015-02-12 11:01  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

     文件        187  2015-01-19 10:51  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config

     文件      93696  2015-02-12 11:01  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb

     文件      22984  2015-02-12 11:01  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        187  2015-01-19 10:51  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config

     文件        490  2010-03-17 22:39  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件        187  2015-01-19 10:51  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048.vshost.exe.config

     文件        490  2010-03-17 22:39  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048.vshost.exe.manifest

     文件    1278464  2015-02-14 10:42  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048逗你玩.exe

     文件        185  2015-02-12 11:46  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048逗你玩.exe.config

     文件      56832  2015-02-14 10:42  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048逗你玩.pdb

     文件      22472  2015-02-14 11:33  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048逗你玩.vshost.exe

     文件        185  2015-02-12 11:46  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048逗你玩.vshost.exe.config

     文件        490  2010-03-17 22:39  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\2048逗你玩.vshost.exe.manifest

     文件        187  2015-01-19 10:51  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\WindowsFormsApplication1.vshost.exe.config

     文件        490  2010-03-17 22:39  2048\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\WindowsFormsApplication1.vshost.exe.manifest

     文件      57500  2015-02-14 10:42  2048\WindowsFormsApplication1\WindowsFormsApplication1\Form4.cs

     文件       8034  2015-02-14 10:42  2048\WindowsFormsApplication1\WindowsFormsApplication1\Form4.Designer.cs

     文件    1535030  2015-02-14 10:42  2048\WindowsFormsApplication1\WindowsFormsApplication1\Form4.resx

     文件       1308  2015-01-19 20:13  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7168  2015-02-12 09:50  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2015-01-19 10:51  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2015-01-19 10:51  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2015-01-19 10:51  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       5120  2015-02-11 00:05  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件       3627  2015-02-12 11:01  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt

     文件       1248  2015-02-11 13:48  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache

     文件       2209  2015-01-19 10:52  2048\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache

............此处省略43个文件信息

评论

共有 条评论