Pascal版2048
最近几个月我一直在写2048。。。前前后后改了好几次,现在大概已经是1.7版本了。
至于2048的规则请自问度娘。
这个版本的2048和原版有了一些不同。。
1.增加分数奖励系统
顾名思义。。。就是达到一定分数会有奖励。具体不便透露,请在游戏中自行尝试
2.存档功能
也是顾名思义。。将当前游戏存档以后可再次读取。。
其余的和原版也并没有什么不同。。。还是自己试试吧。。
传送门:
http://pan.baidu.com/s/1dDGhrf7
【不会传文件把它放在了度娘网盘凑和着看吧】
这个游戏做的可能没有原版好。。当然也不可能做得比原版好,毕竟用的是苦逼的Pascal。。。
不过也没关系。。做这个只是为了消遣,也是为了证明Pascal也能写一些好游戏【自卖自夸】
【另外存档和最高分是以文件形式存储的请不要乱改乱删否则。。。后果自负。。。】
接下来放几张图吧。。。
主界面
当然程序还是有一些bug的。。。发现请指出:)
【新发现超级无敌大bug只要用撤销功能就会全屏方块消失。。。在没有修复之前还是不要用了吧。。。】
至于代码。。。由于写的又臭又长,我就只贴主程序吧。。。
beginif not fileexists(name) thenbeginassign(point,name);rewrite(point);close(point);assign(point2,score);rewrite(point2);close(point2);end;randomize;cursoroff;l:=1;3:textcolor(15);printstart(l);tmp:=' ';dq:=false;cdcz:=false;cd:=false;while (tmp<>#13)and((tmp<>#72)or(l=1))and((tmp<>#80)or(l=3)) dotmp:=readkey;case tmp of#13:beginif l=3 then begin printhighest;cd:=false;goto 3;end;if l=2 then begin readcd;if not cdcz then goto 3;end;end;#72:beginl:=l-1;printstart(l);goto 3;end;#80:beginl:=l+1;printstart(l);goto 3;end;end;2:start;clrscr;if l=1 then cd:=false;while pd dobeginif not one2 and not cxcg and not wujinok and not dq and not save and not cdcz then make elsebeginif one2 then one2:=false;if wujinok then wujinok:=false;if dq then dq:=false;if save then save:=false;if cdcz then cdcz:=false;end;1:f:=false;if saveok or cd then printcd;reward;if not pd then break else printtip;print2;printtail;if ice thenbeginkey:=readkey;while key<>#13 do key:=readkey;ice:=false;clrscr;print;if not pd then break else printtip;printans;printtail;end;if f then begin get(d,b);get(b,a);ans4:=ans3;ans3:=ans2;end;move;clrscr;if not f then begin writeln('No move!!!');goto 1;end;if save then write('Save OK!!!');if not wujin thenfor i:=1 to n dofor j:=1 to n doif a[i,j]=2048 thenbeginif cd or saveok then clearcd;print;writeln('You win!!!');writeln('Score:',ans);highest;writeln('Play again?(Enter)');if readkey=#13 then goto 2 else begin halt;end;end;end;if saveok or cd then clearcd;writeln('Game over!!!');writeln('Score:',ans);highest;writeln('Play again?(Enter)');if readkey=#13 then begin goto 2 end else if readkey<>#13 then writeln('Really?');if readkey=#13 then haltelse begin ice:=true;goto 2;end;
end.
【写的太渣,不喜勿喷。】
Pascal版2048相关推荐
- 网页版2048html制作,基于HTML+CSS+JS的网页版2048的实现.pdf
ELECTRONICS WORLD ・探索与观察 基于HTML+CSS+JS的网页版2048的实现 山西农业大学 王艺燕 [摘要] 描述了一个使用HTML和CSS进行UI界面设计,使用JS进行后台逻辑 ...
- 2048网页版html项目报告,jQuery编写网页版2048小游戏
大致介绍 看了一个实现网页版2048小游戏的视频,觉得能做出自己以前喜欢玩的小游戏很有意思便自己动手试了试,真正的验证了这句话-不要以为你以为的就是你以为的,看视频时觉得看懂了,会写了,但是自己实现起 ...
- 详解200行Python代码实现控制台版2048【总有一款坑适合你】【超详细】
跟着实验楼学习了2048的Python实现,先丢个地址 200行Python代码实现2048 我接触Python时间不长,只了解一些基本的语法和容器,在学习的过程中遇到不少问题,这里做一个记录. cu ...
- 一个用 C 语言写的迷你版 2048 游戏,只有 500个字符
Jay Chan 用 C 语言写的一个迷你版 2048 游戏,只有 487 个字符.来围观吧 M[16],X=16,W,k;main(){T(system("stty cbreak" ...
- 一个用 C 语言写的迷你版 2048 游戏,仅仅有 500个字符
Jay Chan 用 C 语言写的一个迷你版 2048 游戏,仅仅有 487 个字符. 来围观吧 M[16],X=16,W,k;main(){T(system("stty cbreak&qu ...
- java编辑2048小游戏_Java 制作命令行版 2048小游戏
Java 命令行版 2048小游戏(2020年8月14日) 制作背景 大二即将开学,从头开始学习了一个多月的java,对二维数组的操作稍微熟悉了一些.于是想做一个简单的2048来试一试. 众所周知,2 ...
- 网页版2048小游戏
网页版2048小游戏 使用jquery3.3.1 进行的一次开发,各文件源码如下: 2048.css .div_2048{background-color: #FFFAF0;width:1000px; ...
- Cocos2d-x 3.x版2048游戏开发
Cocos2d-x 3.x版2048游戏开发 本篇博客给大家介绍如何快速开发2048这样一款休闲游戏,理解整个2048游戏的开发流程,从本篇博客你将可以学习到以下内容: 这里注明一下,本教程来自极客学 ...
- [C语言]文字版2048
/*文字版20482020.5.6by 小铭 */ #include <stdio.h> #include <windows.h> #include <string.h& ...
最新文章
- tkinter实现进度条
- mysql中jdbc的metadata_JDBC(九)DatabaseMetaData 数据库元数据
- java json的使用方法_JAVA编写JSON常用的三种方法
- 好习惯!pandas 8 个常用的 option 设置
- 我以为信用卡多就是好事,谁知道……
- 【音乐】想不起来歌名的瞎唱
- Jenkins与代码上线解决方案
- css属性~(积少成多)
- android httpclient webview,android – 访问WebView中的http响应头?
- 漫画:一场大会,秀出了中国人自己的操作系统!
- win10无法装载iso文件_win10专业版系统无法加载iso文件怎么办
- Android Studio 消除Manifest文件中的黄色背景警告
- 【机器人学习】SCARA机器人正逆运动学分析与直线轨迹规划
- oel+oracle,OEL7.6安装Oracle Database 19C(VERSION 19.3.0.0)
- IJCAI 2021丨时间序列相关研究论文汇总
- python 处理pandas的panel数据
- 通过X11转发在服务器上用IGV
- 我们需要培养职业化的工作习惯
- FPGA数字信号处理(八)Quartus FFT IP核实现
- java GUI实现用户管理系统