登录
首页 » C# » 彩色连珠小游戏

彩色连珠小游戏

于 2022-02-20 发布 文件大小:963.50 kB
0 122
下载积分: 2 下载次数: 1

代码说明:

左边的是一个panel面板,用来当做棋盘,启动时把方格线画好,这些球都是一些事先弄好的图片文件(考虑过用图形学的方法代码生成,但是感觉效率太低,最重要的是不好看,所以还是放弃了),通过g.DrawImage()的方法画在面板上,清空的话就是用背景色填充,点击某个球会动态的变化大小,点击空白处会将之前点过的球动态的移动到那里,球每次移动时需要查找能够到达指定位置的最短路径,所以会用到《人工智能》课上用过的查找算法查找最短路径,出子就是用Random随机函数随机的在某个位置画某种颜色的球,每次移动球后都要判断在横、竖、左斜、右斜四个方向上是否有可以消的球,消完球后随机出3个球,出球的同时要判断棋盘是否满。 简单的实现了保存成绩的功能(以及对成绩进行加密),功能做的很简陋,其实还可以添加一些声音的,限于时间就没弄了,有兴趣的可以尝试一下。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • USXEPLIN
    共享完整的LIN通讯程序代码,适用于主节点和从节点,适用芯片MC9S12XEP100,飞思卡尔的16位单片机在此程序的基础之上稍微修改下寄存器就可以适用了(LIN communication procedures to share the complete code for the master node and slave nodes, for chip MC9S12XEP100, Freescale 16-bit microcontrollers based on this procedure can be slightly modified for the next register)
    2010-07-18 13:31:13下载
    积分:1
  • lw_oopc-v1.2
    一种轻量级的面向对象的C语言编程框架:LW_OOPC。LW_OOPC是Light-Weight Object-Oriented Programming in(with) C的缩写,总共一个.h文件,20个宏,约130行代码,非常的轻量级,但却很好的支持了很多面向对象的特性,比如继承、多态,可以优美的实现面向接口编程。这个框架系由台湾的高焕堂先生以及他的MISOO团队首创,之后由金永华继续改进优化,最后,经高焕堂同意以LGPL协议开源(开源网址参见后文)。 用C语言实现OO?我没听错吗?这听起来真是太疯狂了!… 大家都知道,C++支持了面向对象和面向泛型编程,比C要更强大些。那么,为什么要在C语言中实践面向对象呢?为什么不直接使用C++呢? 希望这套宏,能够真正帮助到想用C语言写出面向对象代码的C程序员们! 源码包括几个使用这套宏的代码示例,可以认真钻研下。(A lightweight, object-oriented C language programming framework: LW_OOPC. LW_OOPC is an acronym for Light-Weight Object-Oriented Programming in (with) C, total. H file, 20 macro, about 130 lines of code, very lightweight, but very good support for object-oriented features, such as inheritance, polymorphism, and interface-oriented programming can be beautiful. This framework is the first team by of Taiwan Mr. Gao Huantang his MISOO continue to improve optimization, followed by Jin Yonghua, see below) agreed to LGPL the agreement open source (open source URL, GAO Huan-tang. Using C language implementation of Estimates of? I did not hear it? It sounds really crazy! ... As we all know, C support object-oriented and oriented generic programming than C to be more powerful. So, why do you want to practice in C language object-oriented? Why not just use C? I hope this set of macros, can really help to write object-oriented code C programmers who want to use the C language! Source includ)
    2012-11-21 14:36:34下载
    积分:1
  • OPF
    optimal power flowoptimal power flowoptimal power flowv
    2013-10-15 12:38:09下载
    积分:1
  • 字典源文件
    该代码是编辑字典查询软件的一项必备的文件,包含很多词条,且各个词条排布很有规律,适合于C语言学习者进行代码编辑训练
    2022-08-22 02:27:03下载
    积分:1
  • pso
    利用该程序为标准粒子群优化算法,可最为处理复杂问题的基础 (The basis of the program standard particle swarm optimization algorithm, can be the most complex issues)
    2013-03-04 16:18:54下载
    积分:1
  • show_SNA
    显示奇怪非混沌吸引子. 获得数据后, 用外部软件: origin等画出.(showed strange non-chaotic attractor. Access to data, the use of external software : origin such as paint.)
    2007-06-15 21:09:16下载
    积分:1
  • 330
    利用AJAX实现无刷新模式的在线聊天系统,该系统特点如下:1、不会造成网页重新加载 2、不打断用户的其它操作(Achieved without the use of AJAX refresh mode online chat system, which features are as follows: 1, 2 does not cause page reload, do not interrupt the user' s other operations)
    2013-08-15 22:53:14下载
    积分:1
  • KEY
    51单片机6个io口21个按键的设计源程序,并且具有单击双击,长按功能!(51 microcontroller 6 io port 21 key design source, and double-click-click, long press function!)
    2013-03-07 00:42:43下载
    积分:1
  • precoding
    mimo预编码c++程序,相互学习,相互帮助(mimo precoding c++ program, learn each other and help each other)
    2015-01-22 20:12:30下载
    积分:1
  • loess-master
    局部加权平均算法,用于时间序列预测,大家看着给点好处就好(Local weighted average algorithm for time series prediction.)
    2021-04-12 18:48:57下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载