• 大小: 678KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-07
  • 语言: C#
  • 标签: 连连看  C#  源代码  

资源简介

用C#编写的连连看小游戏,整个项目都在,可以直接调试运行。包含连连看核心处理类(用到了两种实现方式:一种是c#类,一种是js类),和其他游戏运行所需要的资源,web版本。 补充:本项目旨在编写一种方法来实现某些功能,目的并非编写游戏,所以游戏暂未设置关卡难度得分等等,不过本人预留了相关接口,有兴趣的朋友可以自己实现

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Security.Cryptography;
using System.Text;

namespace GemGames
{
    public partial class CardsTest : System.Web.UI.Page
    {
        private static string conn = “Data Source=115.238.30.118;Initial Catalog=GameCenter_Debug;Persist Security Info=True;User ID=sa;Password=Ferry123“;

        protected void Page_Load(object sender EventArgs e)
        {
            lblInfo.Text = ““;
        }
        /// 
        /// 执行查询语句,返回DataSet
        /// 

        /// 查询语句
        /// DataSet
        public DataSet Query(string SQLString)
        {
            using (SqlConnection connection = new SqlConnection(conn))
            {
                DataSet ds = new DataSet();
                try
                {
                    connection.Open();
                    SqlDataAdapter command = new SqlDataAdapter(SQLString connection);
                    command.Fill(ds “ds“);
                }
                catch (System.Data.SqlClient.SqlException ex)
                {
                    throw new Exception(ex.Message);
                }
                return ds;
            }
        }
        /// 
        /// 执行一条计算查询结果语句,返回查询结果(object)。
        /// 

        /// 计算查询结果语句
        /// 查询结果(object)
        public object GetSingle(string SQLString)
        {
            using (SqlConnection connection = new SqlConnection(conn))
            {
                using (SqlCommand cmd = new SqlCommand(SQLString connection))
                {
                    try
                    {
                        connection.Open();
                        object obj = cmd.ExecuteScalar();
                        if ((object.Equals(obj null)) || (object.Equals(obj System.DBNull.Value)))
                        {
                            return null;
                        }
                        else
                        {
                            return obj;
                        }
                    }
                    catch (System.Data.SqlClient.SqlException e)
                    {
                        connection.Close();
                        throw new Exception(e.Message);
                    }

                    finally
                    {
                        cmd.Dispose();
                        connection.Close();
                    }
                }
            }
        }
        /// 
        /// 执行SQL语句,返回影响的记录数
        /// 

        /// SQL语句
        /// 影响的记录数
        public int ExecuteSql(string SQLString)
        {
   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-01-04 13:49  GemGames\
     目录           0  2013-01-04 13:49  GemGames\GemGames\
     目录           0  2013-05-10 10:01  GemGames\GemGames\App_Data\
     文件        1185  2012-08-20 09:12  GemGames\GemGames\CardsTest.aspx
     文件        9247  2012-08-20 09:24  GemGames\GemGames\CardsTest.aspx.cs
     文件        2330  2012-08-20 09:12  GemGames\GemGames\CardsTest.aspx.designer.cs
     文件          90  2012-07-08 16:34  GemGames\GemGames\GemGame.ashx
     文件        6186  2012-07-23 11:47  GemGames\GemGames\GemGame.ashx.cs
     文件        3292  2012-08-23 16:14  GemGames\GemGames\GemGames.Publish.xml
     文件        7501  2012-08-23 13:53  GemGames\GemGames\GemGames.csproj
     文件        1088  2012-08-23 13:53  GemGames\GemGames\GemGames.csproj.user
     文件          92  2012-07-10 18:26  GemGames\GemGames\Global.asax
     文件         925  2012-07-10 18:30  GemGames\GemGames\Global.asax.cs
     文件         354  2012-07-30 14:02  GemGames\GemGames\HTMLPage1.htm
     目录           0  2013-01-04 13:49  GemGames\GemGames\Properties\
     文件        1317  2012-07-05 20:14  GemGames\GemGames\Properties\AssemblyInfo.cs
     目录           0  2013-01-04 13:49  GemGames\GemGames\scripts\
     文件        1159  2012-08-15 10:51  GemGames\GemGames\scripts\GamesModel.js
     文件        9488  2012-08-15 11:59  GemGames\GemGames\scripts\GemGame.js
     文件       41081  2012-07-11 19:56  GemGames\GemGames\scripts\GemGameBLL.js
     文件        5065  2012-08-23 15:50  GemGames\GemGames\scripts\linkGame.js
     文件        1719  2012-07-27 10:32  GemGames\GemGames\scripts\common.js
     文件      239835  2012-07-05 20:14  GemGames\GemGames\scripts\jquery-1.4.1-vsdoc.js
     文件      168792  2012-07-05 20:14  GemGames\GemGames\scripts\jquery-1.4.1.js
     文件       71922  2012-07-05 20:14  GemGames\GemGames\scripts\jquery-1.4.1.min.js
     文件        2951  2012-07-10 19:21  GemGames\GemGames\scripts\model.js
     目录           0  2013-05-10 10:01  GemGames\GemGames\styles\
     目录           0  2013-01-04 13:49  GemGames\GemGames\Tools\
     文件         100  2012-08-15 09:56  GemGames\GemGames\Tools\linkGames.ashx
     文件        6127  2012-08-23 14:02  GemGames\GemGames\Tools\linkGames.ashx.cs
     目录           0  2013-01-04 13:49  GemGames\GemGames\bin\
............此处省略145个文件信息

评论

共有 条评论