首页>>国际

吃瓜爆料小羊没烦恼在线观看_⎛⎝(官方)⎠⎞👏-越南区

2025-03-24 14:23:08 | 来源:本站原创
小字号

分享吃瓜爆料小羊没烦恼在线观看_⎛⎝(官方)⎠⎞👏-越南区llehsko

吃瓜爆料小羊没烦恼在线观看  〖壹〗cs开箱、保持环境卫生csgo开箱网站可信么:在旅行过程中igxe开箱,请不要乱扔垃圾good开箱网,保护自然环境d2开箱网站。同时181开箱网,尽量使用环保袋csgo开箱子钥匙在哪买,减少塑料垃圾的产生国内csgo开箱网站大全。体验当地美食csgo开箱skinsdog:怒江大峡谷地区有丰富的特色美食完美平台官网,如烤全羊网易BUFF饰品交易平台、石板烤肉csgo开箱一个箱子多少钱、酸汤鱼等csgo开箱网站5。不妨尝试当地的特色菜肴s9csgo,体验不同的风味egg。

吃瓜爆料小羊没烦恼在线观看  〖贰〗t8、**环境保护**007csgo:怒江大峡谷是一个生态敏感区域csgo开箱对战,旅行时应尽量减少对环境的影响MUcsgo,不乱扔垃圾开箱skin,不损坏植被csgo好的开箱网站。 **交通与住宿**181skins:怒江地区的交通可能不太便利csgo开箱网站几毛钱的,建议提前预订交通工具和住宿csgo游戏箱子。如果选取露营csgogood,确保选取一个安全的地点csgo首次免费开箱网站,并遵循露营的基本规则fcsgo开箱网。

吃瓜爆料小羊没烦恼在线观看  〖叁〗开箱子网站、防晒保暖181开箱:由于峡谷地区可能会有较强的日照skins开箱网站,建议携带防晒霜csgo开箱网站官网、太阳帽和墨镜等防晒用品csgoskins开箱网。同时最新的csgo开箱网站,由于早晚温差较大37csgo,要注意保暖681csgo开箱网。携带常用药物csgo官方开箱网站在哪里进:随身携带一些常用药物good开箱,如晕车药181skins开箱网、感冒药cs开箱、创可贴等CSGO开箱网,以备不时之需cs2开箱模拟器。

吃瓜爆料小羊没烦恼在线观看  〖肆〗五亿对战平台、尊重当地文化csgo中国免费开箱网站推荐:在怒江大峡谷地区t8,您可能会遇到不同的民族和文化csgo开箱网。尊重当地的风俗习惯好兄弟,与当地居民友好相处5egame开箱网站。环保意识csgo第三方开箱网站:在旅行过程中csgocn开箱,保护环境163开箱网,不乱丢垃圾f99skins开箱网,尽量减少对自然环境的影响五e开箱。总之farmskins 网,在前往怒江大峡谷自驾游时hellcase开箱网站,做好充分的准备gogocsgo,确保行程安全顺利csgo8开箱网。

吃瓜爆料小羊没烦恼在线观看  〖伍〗681开箱网、徒步探险csgo免费开箱网站送0.8刀:对于喜欢徒步的旅行者来说b5,怒江大峡谷提供了多条徒步线路csgo开箱哪个网站靠谱,可以深入探索峡谷的每一个角落181开箱网站。其中jtskins开箱网,虎跳峡是一条非常著名的徒步路线网站开箱,沿途可以体验到峡谷的原始风貌csgo开箱子网站。访问少数民族村寨csgo免费开箱网站送0.8刀:怒江地区居住着多种少数民族cs:go开箱网站95skins,如傈僳族csgo盲盒开箱网站tech、怒族csgo开箱网skins、藏族等37开箱网。

吃瓜爆料小羊没烦恼在线观看  〖陆〗csgo开箱网站免费抽、怒江位于中国云南省西北部悠悠,是一条蜿蜒曲折的世界河流cs模拟开箱,流经西藏自治区和云南省cs ob,最终注入缅甸的萨尔温江开箱网skins。怒江峡谷以其壮丽的自然风光和独特的民族文化而闻名csgo哪个开箱网站好。

吃瓜爆料小羊没烦恼在线观看  〖壹〗cs:go开箱网站公认最好的、怒江地理位置开箱网最新:怒江位于云南省的西北部b5官网对战平台,是一条重要的河流181开箱skins。 云南省概况csgo开箱箱子推荐:云南省是中国的一个多民族的省份csgo如何开箱好,地处中国的西南部box开箱网,与多个省份交界csgo2开箱。该省拥有丰富的自然资源和多样的民族文化完美竞技平台。 怒江的特点csgocn:怒江因其地势险峻bu f f、山势雄伟而著称csgo新的开箱网站。该河流流域内的自然景观独特csgo2开箱,拥有丰富的生态资源csgo开箱网站手机版下载。

吃瓜爆料小羊没烦恼在线观看  〖贰〗完美对战平台下载、怒江在中国ai百度。怒江位于中国西南部csgo开箱网茄子推荐,是中国云南省境内的一条江专门给csgo开箱的网站。它发源于青藏高原csgo官匹免费开箱网站,自北向南流动完美开箱网,最终汇入缅甸的萨尔温江007csgo。怒江流域地势复杂csgo开箱网站靠谱不,山高谷深csgo开箱大网站,具有独特的自然地理特点csgobox。怒江是中国的重要水系之一v5开箱,不仅为当地居民提供了丰富的水资源007csgo,还具有极高的生态价值csgo完美官网。

吃瓜爆料小羊没烦恼在线观看  〖叁〗csgo官网免费开箱、怒江位于云南省csgo8。怒江是中国西南地区的一条江csgo开箱网站y网,流经多个省份cs:go开箱网址导航。其中csgo开箱网站靠谱不,怒江的主要河段位于云南省境内M24csgo开箱网。怒江的名称来源于其水流湍急d2开箱网站、气势汹涌的特点csgo网站开箱,寓意着愤怒的情绪csgo5e开箱网。云南省位于中国西南边陲csgo开箱小f网,是一个地形复杂bug开箱网、多民族的省份csgocn。

吃瓜爆料小羊没烦恼在线观看  怒江今天的天气情况5egame开箱?云南怒江州天气预报今天g1csgo?-第1张图片-OOKT百科

吃瓜爆料小羊没烦恼在线观看  〖壹〗悠悠、比较好的旅游时间应安排在每年的10月至次年4月csgo完美平台官网下载。怒江州属亚热带山地季风气候开箱网新网,具有立体气候的特点csgo2开箱网站。到怒江观光旅游csgo开箱网站yskins,可以说四季皆宜csgo开箱网站手机版下载。怒江州的旅游资源得天独厚skins,属于三江并流景区的重要组成部分incsgo。

吃瓜爆料小羊没烦恼在线观看  〖贰〗全新csgo开箱网、怒江最佳旅游时间 每年10月下旬到第二年4月底左右csgo正规开箱网,是怒江旅游的最佳时机五一对战平台,因为这个时间段66hash,怒江风景如画ddcsgo,山间树木枝繁叶茂开箱,多姿多彩csgo皮肤交易平台,还有一些不知名的花花草草csgo开箱网skins,江水碧绿csgo开箱网egg,气候宜人csgo开箱网站5,一般不会有中雨以上的天气csgo开箱,发生山体滑坡的可能性极小完美对战平台官网。

吃瓜爆料小羊没烦恼在线观看  〖叁〗cs:go开箱网站免费抽、了解当地气候igxe官网:怒江大峡谷地区属于亚热带季风气候csgo如何开箱好,四季分明悠悠饰品交易平台,雨量充沛dog钥匙开箱网。最佳旅游时间是每年的3月至5月和9月至11月csgo开箱网egg,这两个时段天气较为稳定csgo最好玩的开箱网站,降雨较少开箱网站好兄弟。选取合适的交通方式开箱子csgo网站:怒江大峡谷地区的交通相对不便cs:go开箱网站免费抽,可以选取自驾kkcsgo、乘坐长途汽车或参加旅游团队csgo完美。

吃瓜爆料小羊没烦恼在线观看  〖肆〗csgo8开箱网、云南的怒江是一条风景如画的小众旅游线路csgo开箱f网网站,四季各有特色88dog,但秋冬为最佳旅游时间csgo饰品,因为夏春季节多雨csgo开箱子多少钱一次,道路安全系数较低csgoskins。 独龙族纹面女开箱网:独龙族的纹面女是怒江的一大特色好兄弟开箱,这种传统如今已经失传开箱网站官网,现存纹面女数量稀少完美平台官网。未来完美开箱,这一文化可能会以“贴面”形式重现M24csgo。

吃瓜爆料小羊没烦恼在线观看  到怒江旅游的攻略有以下几点t8:怒江旅游的攻略包括了景点选取csgo钥匙、交通方式开箱网、当地特色美食和必备物品等csgo饰品交易网。选取合适的景点是怒江旅游的关键悠悠饰品交易平台,可以考虑到怒江大峡谷csgo开箱网box、泸水古城jtskins、怒江第一湾等著名景点极游社开箱网。在交通方面开箱网95skins,可以选取飞机Rskisn开箱网、火车或长途汽车等方式前往csgo开箱网站官网,根据个人情况选取最方便的交通工具Rskisn。

吃瓜爆料小羊没烦恼在线观看  环保意识CSGO开箱:保持环境卫生csgo网站抽箱子,不要乱扔垃圾Rskisn,保护自然环境s9skins开箱网站。身体状况95skins!:由于怒江地区海拔较高csgo饰品,如果有高原反应的症状csgo开箱网址推荐,应适当休息并及时就医csgo cn。 结束行程 在怒江大桥的行程结束后5e活动,可以选取返回昆明或者继续深入云南其他地区进行旅游cs交易。如果时间允许dog88钥匙,可以考虑前往丽江x7skins开箱、大理等地csgo国外开箱网站 好的,体验更多的云南风情完美开箱。

吃瓜爆料小羊没烦恼在线观看  注意安全5egame开箱:怒江大峡谷地形险峻v5,部分路段可能存在塌方csgo最便宜开箱网站、滑坡等自然灾害风险5e开箱。在旅行过程中要注意安全MUcsgo,遵守当地的安全提示和规定好兄弟网。携带现金cs:go免费开箱一次的网站:虽然现在移动支付非常普及b5官网对战平台,但在怒江大峡谷的一些偏远地区可能无法使用csgo官网开箱网站地址。因此x7skins-开箱,出行时比较好携带一定数量的现金cs2开箱。

吃瓜爆料小羊没烦恼在线观看  安全注意事项好兄弟:因为怒江沿线的景区大多为高海拔地区csgo开箱网egg,行车过程中需要注意保持车速稳定skskins开箱网、避免疲劳驾驶开箱网站推荐,同时注意防晒开箱网、保持身体水分等csgo5e开箱网。 行车路线悠悠:昆明 - 楚雄 - 丽江 - 大理 - 怒江csgo开箱网站在哪,行车时间大约在6-7天之间开箱子网站,具体时间根据自己的时间规划安排gogocsgo。

吃瓜爆料小羊没烦恼在线观看  而海拔2300米以上的高山区csgo开箱对战,年平均温度低于10°Cigxe饰品交易平台,最热月18°C以上全网出金最好的csgo开箱网站,最低气温则在31°C以下skins开箱网,极端最低气温可达-2°C以下免费开箱新网站csgo,积温低于3223°Cskinport,是全州气温最低ZZcsgo,热量最匮乏的区域x7skins。

吃瓜爆料小羊没烦恼在线观看  潞江坝冬天的最低温度大约在5C至10C之间98kbox开箱网。潞江坝位于中国云南省西部flycsgo开箱网,怒江中游csgo开箱推荐。这个地区的气候属于热带季风气候模拟csgo开箱,但由于其高海拔和地理位置csgo大型开箱网站,冬天的温度可能会比较低网易buff。根据历史气象数据cs开箱模拟器,潞江坝冬天的最低温度大约在5C至10C之间极游社。第一个因素是海拔高度cncs。

吃瓜爆料小羊没烦恼在线观看  云南怒江跟云南昆明是差不多的csgo最便宜开箱网站,四季如春csgo开箱哪个网站靠谱,最低温度的话正常也不会低于0度的cs:ob。可以借鉴一下最近的天气情况csgo cn。

吃瓜爆料小羊没烦恼在线观看  云南怒江天气预报10月08日(今天)白天完美竞技平台:中雨ZBT饰品交易平台,夜间5e平台:大雨csgo好的开箱网站,20~26℃gogocsgo。南风3-4级MUcsgo;10月09日(周五)白天五e开箱:大雨x7skins-开箱,夜间good开箱:大雨cs 开箱,18~20℃免费开箱新网站csgo。南风3-4级悠悠;10月10日(周六)白天igxe开箱:大雨csgo饰品开箱,夜间csgo开箱哪个平台好:小雨csgo2,16~22℃csgo开箱网站5。南风3-4级cs go开箱推荐;10月11日(周日)白天egg:小雨cs:go模拟开箱网,夜间国内csgo饰品交易平台:小雨funskins 5e手机版,16~21℃csgo免费开箱网站下载。

吃瓜爆料小羊没烦恼在线观看  云南高考天气预报完美竞技平台:丽江大理等降雨显著 云南高考天气 预计2022年高考期间(6月6日至9日)5e开箱网,我省将有一次强降雨过程csgo开箱子网站好。丽江csgo网站买箱子、大理csgo开箱网站11、楚雄csgo开箱软件、怒江csgogood、保山88888开箱网、德宏csgo开箱箱子推荐、临沧95skins开箱、普洱88钥匙网、西双版纳cs完美平台怎么下载、红河南部阴有中到大雨局部暴雨csgo中国开箱网站,其中普洱东南部csgo抽奖、西双版纳东部csgo在线开箱子网站、红河西南部有大暴雨csgo开箱平台。

吃瓜爆料小羊没烦恼在线观看  云南7月份的天气因地理位置和海拔差异而有所不同csgo饰品盲盒,但总体来说igxe,大部分地区的气温较为宜人skins开箱,接近或略高于常年同期cs:go网站开箱模拟器。根据近期天气预报和气候趋势预测开箱,云南7月份的平均气温可能在16℃至30℃之间csgo免费开箱软件,具体温度还会受到降雨81csgo、风力等天气因素的影响csgocn开箱。

吃瓜爆料小羊没烦恼在线观看  五一期间云南大部地区以阴雨天气为主csgo免费开箱网站地址。据云南省气象局预测95skins!,5月1日至2日95skins开箱,云南省的迪庆csgo官网免费开箱、怒江M24csgo、保山5egame、德宏b5对战平台官网、西双版纳多云有阵雨cs:go箱子网站,局部中雨igxe,其他地区多云x7skins-开箱,局部有阵雨完美对战平台;3日至4日csgo茄子开箱网站靠不靠谱,保山cs9skins、德宏igxe开箱、临沧88hash、西双版纳0sc网开箱、普洱csgo开箱平台、红河good开箱网、文山阴有中雨至大雨完美竞技平台,局部暴雨开箱网,其他地区阴间多云csgo开箱网站手机版下载,有小雨至中雨csgo开箱子网站,局部大雨csgo开箱网站几毛钱的。

吃瓜爆料小羊没烦恼在线观看  近来云南的天气不太好csgo第三方网站开箱,部分城市下大暴雨181skins开箱网csgo,造成了一定的影响cskins。大家近期出行的时候注意csgo茄子开箱网站靠不靠谱,在昆明有这些区域是积水路段csgobox,如果大家要开车出门尽量还是避开cs:go开箱网址导航。

吃瓜爆料小羊没烦恼在线观看  云南五一期间天气预报显示csgo完美官网,五一期间云南大部地区以阴雨天气为主csgo开箱几率高的网站。1日至2日18skins开箱网,云南省的迪庆f99skins、怒江开箱网681、保山csgo免费开箱一次的网站在哪、德宏csgo5e开箱、西双版纳多云有阵雨skskins开箱网,局部中雨iceskins开箱网,其他地区多云hb慈善包,局部有阵雨csgo饰品交易;3日至4日完美开箱网,保山csgo钥匙在哪买便宜、德宏cs:go免费开箱一次的网站、临沧cs:go交易平台开箱、西双版纳csgo开箱子钥匙在哪买、普洱开箱模拟器csgo、红河csgo在哪个网站开箱子、文山阴有中雨至大雨681csgo开箱网,局部暴雨88hash,其他地区阴间多云csgo开箱网站靠谱吗,有小雨至中雨vipcsgo,局部大雨5e上的csgo开箱网站。

【文章由本站原创】

感谢大家对吃瓜爆料小羊没烦恼在线观看_⎛⎝(官方)⎠⎞👏-越南区提出建议。
(责编:admin)

分享让更多人看到

Simple Criss-Cross Game Game Project using C Language - Tech Blog

Simple Criss-Cross Game Game Project using C Language

This is a simple Criss-Cross Game Project developed using C-Language and Graphics. The IDE and environment used for this project  Turbo C.

Screenshort

Code for Criss-Cross Game

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<process.h>
#include<dos.h>
#define ESC 0x1b
#define ENT 13
#define TAB 9
#define LEFT 75
#define RIGHT 77
FILE *fs;
struct winlist
{
char win[60];
char loss[60];
};
typedef struct winlist wk;
long int SIZE =sizeof(wk);
void Swindow(void);
void HELP(void);
void graf(void);
int Clear(int );
int Refresh(int );
char sub_REFRESH();
void animation(void);
void submain(void);
void subshow(void);
void result(void);
void msgbox(void);
int optionYN(void);
void winbox(void);
void winlist(void);
void winbox1(void);
int matrix[3][3];
int mat[3][3];
void main(void)
{
int i,j,a,gdriver = DETECT, gmode;
char choice;
initgraph(&gdriver, &gmode, "c:\\WINDOWS/Crossgam/"); // Change Driver Path as per your turbo C Graphics EGAVGA.BGI file
animation();
exit(0);
}
void submain(void)
{
int flag=0,i,j,a;
char choice;
Swindow();
subshow();
input:
fflush(stdin);
choice=getch();
setfillstyle(SOLID_FILL,BLACK);
bar(300,400,600,430);
if(choice==ESC){ HELP(); goto input; }
if(choice=='0'){msgbox();}
if(choice=='s'||choice=='S'){winbox1();winlist();}
if(choice=='7' && flag==0 && mat[1][1]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(240,160,"X"); flag=1; matrix[1][1]=1,mat[1][1]=1;
if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
{
setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
{
setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
{
setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='7' && flag==1&& mat[1][1]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(240,160,"O"); flag=0; matrix[1][1]=2,mat[1][1]=1;
if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
{
setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
{
setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
{
setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='8' && flag==0&& mat[1][2]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(305,160,"X"); flag=1; matrix[1][2]=1,mat[1][2]=1;
if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
{
setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
}
else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
{
setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='8' && flag==1&& mat[1][2]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(305,160,"O"); flag=0; matrix[1][2]=2,mat[1][2]=1;
if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
{
setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
}
else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
{
setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='9' && flag==0&& mat[1][3]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(370,160,"X"); flag=1; matrix[1][3]=1,mat[1][3]=1;
if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
{
setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
{
setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
{
setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='9' && flag==1&& mat[1][3]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(370,160,"O"); flag=0; matrix[1][3]=2,mat[1][3]=1;
if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
{
setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
{
setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
{
setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='4' && flag==0&& mat[2][1]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(240,215,"X"); flag=1; matrix[2][1]=1,mat[2][1]=1;
if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
{
setcolor(CYAN); line(245,150,245,300);flag=Refresh(flag);
}
else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
{
setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='4' && flag==1&& mat[2][1]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(240,215,"O"); flag=0; matrix[2][1]=2,mat[2][1]=1;
if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
{
setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
}
else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
{
setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='5' && flag==0&& mat[2][2]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(305,215,"X"); flag=1; matrix[2][2]=1,mat[2][2]=1;
if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
{
setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
}
else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
{
setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
{
setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
{
setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='5' && flag==1&& mat[2][2]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(305,215,"O"); flag=0; matrix[2][2]=2,mat[2][2]=1;
if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
{
setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
}
else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
{
setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
{
setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
{
setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='6' && flag==0&& mat[2][3]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(370,215,"X"); flag=1; matrix[2][3]=1,mat[2][3]=1;
if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
{
setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
}
else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
{
setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='6' && flag==1&& mat[2][3]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(370,215,"O"); flag=0; matrix[2][3]=2,mat[2][3]=1;
if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
{
setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
}
else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
{
setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='1' && flag==0&& mat[3][1]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(240,270,"X"); flag=1; matrix[3][1]=1,mat[3][1]=1;
if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
{
setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
{
setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
}
else if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
{
setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='1' && flag==1&& mat[3][1]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(240,270,"O"); flag=0; matrix[3][1]=2,mat[3][1]=1;
if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
{
setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
{
setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
}
else if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
{
setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='2' && flag==0&& mat[3][2]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(305,270,"X"); flag=1; matrix[3][2]=1,mat[3][2]=1;
if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
{
setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
}
else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
{
setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='2' && flag==1&& mat[3][2]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(305,270,"O"); flag=0; matrix[3][2]=2,mat[3][2]=1;
if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
{
setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
}
else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
{
setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='3' && flag==0&& mat[3][3]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(370,270,"X"); flag=1; matrix[3][3]=1,mat[3][3]=1;
if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
{
setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
{
setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
{
setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='3' && flag==1&& mat[3][3]==0)
{
setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(370,270,"O"); flag=0; matrix[3][3]=2,mat[3][3]=1;
if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
{
setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
}
else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
{
setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
}
else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
{
setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
}
else
result();
goto input;
}
else if(choice=='R'||choice=='r')
{
a=1;
for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
flag=0;Swindow();
for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
graf();
flag=Clear(flag); goto input;
}
else
{
sound(2589); delay(150);nosound();setcolor(GREEN);
settextstyle(DEFAULT_FONT,HORIZ_DIR,1);outtextxy(300,400,"Invalid key press"); goto input;
}
stop : closegraph(); _exit(0);
}
void Swindow(void)
{
cleardevice();
setcolor(RED); settextstyle(DEFAULT_FONT,HORIZ_DIR,3);
outtextxy(30,50,"CROSS PUZZLE MIXING GAME");
setcolor(WHITE);
line(225,190,400,190); line(225,250,400,250);
line(275,150,275,300); line(350,150,350,300);
setcolor(YELLOW); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
outtextxy(25,450,"press `Esc' to Help. press `0'(zero) to exit. press `R' to restart.");
outtextxy(25,470,"Press `S' To Show the Winer List");
setcolor(GREEN); outtextxy(50,400,"ENTER VALUE :");
}
int Refresh(int flag)
{
int i,j,a=5;
for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
while(!kbhit())
{
if(flag==0)
{
sound(200);
gotoxy(50,24); printf("SECOND PLAYER IS WINER");
delay(1000);nosound();
}
else
{
sound(200);
gotoxy(50,24); printf("FIRST PLAYER IS WINER");
delay(1000);nosound();
}
gotoxy(50,24); printf(" ");
delay(500);
}
winbox();
flag=0;sub_REFRESH(getch());graf();Swindow();
for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
return flag;
}
int Clear(int flag)
{
int i,j,a=5;
for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
flag=0; Swindow(); return flag;
}
void HELP(void)
{
int i=50;
cleardevice();
setfillstyle(SOLID_FILL,LIGHTGRAY);
bar(0,0,getmaxx(),getmaxy()); setcolor(YELLOW);
settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(50,25,"THE INSTRUCTIONS TO PLAY THE GAME");
setcolor(MAGENTA); outtextxy(380,100,"X");
outtextxy(387,118,"O"); setcolor(BLUE);
outtextxy(220,185,"7 8 9"); outtextxy(220,225,"4 5 6");
outtextxy(220,275,"1 2 3");settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
setcolor(BLACK);
outtextxy(50,90,"[*] Two players must need to play this game.");
outtextxy(50,105,"[*] First player holds the simbol of .");
outtextxy(50,120,"[*] Second player holds the simbol of .");
outtextxy(50,320,"[*] Which player creats a straight line into the box, he is the winer.");
outtextxy(50,335,"[*] To restart the game as fresh, press `R'.");
outtextxy(50,350,"[*] press `0' (zero) to exit the game.");
outtextxy(330,460,"press any key to return back into game");
line(250,170,250,300);line(320,170,320,300);
line(200,210,375,210);line(200,260,375,260);
setcolor(RED);
outtextxy(150,150,"The Keywords which contains the value of puzzle box");
setcolor(LIGHTGREEN);settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
while(!kbhit())
{
while(!kbhit())
{
outtextxy(125,400,"Made By - Subroto Mondal");
sound(i);delay(500);bar(123,398,520,435); delay(500);i=i+15;
}
nosound();
}
Swindow();subshow();
}
void graf(void)
{
int X=160,i=0;
cleardevice();setfillstyle(SOLID_FILL,BLUE);
bar(150,220,465,235);setfillstyle(SOLID_FILL,LIGHTGREEN);
bar(155,215,470,230);delay(500);
while(i<24)
{
setfillstyle(INTERLEAVE_FILL,RED);
bar(X,218,X+10,228);i++;X=X+13;
delay(50);
}
setfillstyle(SOLID_FILL,DARKGRAY);
bar(180,185,460,200);
}
char sub_REFRESH(char ch)
{
int i,j,flag,a=5;
if (ch=='R'||ch=='r')
{
a=5;
for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
flag=0; Swindow();
for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
flag=Clear(flag);
}
else if(ch=='0')
{
a=5;
for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
msgbox();
}
else
{
sound(2589);delay(150); nosound(); setcolor(GREEN);
settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
outtextxy(300,400,"Invalid key press");
}
return 0;
}
void animation(void)
{
int x=120,y=55,i,x1=500,y1=55,x2=320,y2=40,x3=130,y3=230;
setfillstyle(SOLID_FILL,WHITE);bar(0,0,getmaxx(),getmaxy());
delay(1000);
while(!kbhit())
{
setcolor(BLACK);circle(x,y,50);circle(x1,y1,50);
x=x+1,y=y+1,x1=x1-1,y1=y1+1; delay(9);
if(y==430)
{
setcolor(LIGHTBLUE);settextstyle(TRIPLEX_FONT,HORIZ_DIR,3);
for(i=1;i<=3;i++)
{
bar(90,235,700,265);delay(200);
outtextxy(90,235,"Wel Come To Cross Pazzel Mixing Game");
delay(1000);
}
delay(500);bar(0,0,getmaxx(),getmaxy());
setcolor(RED);
while(!kbhit())
{
circle(x2,y2,50);circle(x3,y3,50);
y2=y2+2,x3=x3+2;delay(20);
if(y2==430)
{
setcolor(BLACK);settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
outtextxy(385,6,"Compiled With :Terbo C++");
outtextxy(385,20,"Graphics :Borland Graphics C++");
delay(1000);
goto point;
}
}
}
}
point:
submain();
}
void subshow(void)
{
if(matrix[1][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,160,"X");}
if(matrix[1][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,160,"O");}
if(matrix[1][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,160,"X");}
if(matrix[1][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,160,"O");}
if(matrix[1][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,160,"X");}
if(matrix[1][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,160,"O");}
if(matrix[2][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,215,"X");}
if(matrix[2][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,215,"O");}
if(matrix[2][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,215,"X");}
if(matrix[2][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,215,"O");}
if(matrix[2][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,215,"X");}
if(matrix[2][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,215,"O");}
if(matrix[3][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,270,"X");}
if(matrix[3][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,270,"O");}
if(matrix[3][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,270,"X");}
if(matrix[3][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,270,"O");}
if(matrix[3][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,270,"X");}
if(matrix[3][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,270,"O");}
}
void result (void)
{
int a,i,j,flag;
if(mat[1][1]==1&&mat[1][2]==1&&mat[1][3]==1&&mat[2][1]==1&&mat[2][2]==1&&mat[2][3]==1&&mat[3][1]==1&&mat[3][2]==1&&mat[3][3]==1)
{
sound(2589); delay(150);nosound();setcolor(GREEN);
while(!kbhit())
{
settextstyle(DEFAULT_FONT,HORIZ_DIR,1);outtextxy(250,400,"Incomplite game press any key to reset the game");
delay(500);
bar(240,390,900,410);
delay(100);
}
graf();
a=5;
for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
flag=0;for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
flag=Clear(flag);submain();
}
}
void msgbox(void)
{
int CHOICE,i,j,a,flag;
setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,200,495,350);
setfillstyle(SOLID_FILL,DARKGRAY); bar(140,210,485,340);
setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,212,483,223);
setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
outtextxy(433,214,"_ [] X");outtextxy(145,214,"Meassage Box");
setcolor(WHITE);outtextxy(180,250,"Are You Want To Sure Quit Game?");
outtextxy(210,310,"Press TAB To Select Option.");
outtextxy(210,325,"Press Enter To Select Choice.");CHOICE=optionYN();
if(CHOICE==1){closegraph();exit(0);}else{submain();}
}
int optionYN(void)
{
int CHOICE,ch;
input:
CHOICE=0;
settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
setfillstyle(SOLID_FILL,DARKGRAY);bar(320,280,370,300);
setfillstyle(SOLID_FILL,BLACK); bar(395,280,445,300);
setfillstyle(SOLID_FILL,WHITE); bar(325,275,375,295);
bar(400,275,450,295);setcolor(GREEN);
outtextxy(340,282,"YES");settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(410,278,"NO"); fflush(stdin);
ch=getch();
if(ch==TAB||ch==LEFT)
{
settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
setfillstyle(SOLID_FILL,BLACK);bar(320,280,370,300);
setfillstyle(SOLID_FILL,DARKGRAY);bar(395,280,445,300);
setfillstyle(SOLID_FILL,WHITE);bar(325,275,375,295);
bar(400,275,450,295);setcolor(GREEN);
outtextxy(420,282,"NO");settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(328,278,"YES");CHOICE=1;
if(getch()==ENT){return CHOICE;}else{goto input;}
}
if(ch==ENT){return CHOICE; }else{ goto input; }
}
void winbox(void)
{
wk w;
char ch;
int CHOICE,i,j,a,flag;
setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,200,495,350);
setfillstyle(SOLID_FILL,DARKGRAY); bar(140,210,485,340);
setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,212,483,223);
setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
outtextxy(433,214,"_ [] X");outtextxy(145,214,"Meassage Box");
setcolor(WHITE);outtextxy(160,250,"ENTER WINER NAME :-");
outtextxy(160,280,"ENTER LOOSER NAME :-");
outtextxy(210,325,"Press Enter To Save This Record.");
setcolor(WHITE);
outtextxy(140,230," Press 'Y'to enter winer and losser name..");
getch();
ch=getch();
if(ch=='y'||ch=='Y')
{
gotoxy(41,16); fflush(stdin);
gets(w.win); gotoxy(41,18);
fflush(stdin); gets(w.loss);
fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","ab");
fwrite(&w,SIZE,1,fs); fclose(fs);
}
else
{
setfillstyle(SOLID_FILL,DARKGRAY); bar(200,320,485,340);
outtextxy(210,325,"The record is not save..");
}
}
void winlist(void)
{ int x=24,y=11,x1=45,x2=40,c=1,count=0,count1=0,ch;
wk w;
winbox1();
fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","r");
if(fs==NULL)
{
outtextxy(225,230,"NO DATA FILE WAS FOUND");
}
else
{
while (fread(&w,SIZE,1,fs)==1)
{
count++;
if(count==0)
outtextxy(225,230,"NO RECORD WAS FOUND");
}
fclose(fs);
fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","r");
while(fread(&w,SIZE,1,fs)==1)
{
gotoxy(x-5,y);printf("%d.)",c);
gotoxy(x,y);puts(w.win);
gotoxy(x2,y);printf("Vs");
gotoxy(x1,y);puts(w.loss);
y=y+1; c++; count1++;
if(count1==10)
{
gotoxy(19,23);
printf("Press enter key to continue & `E' to exit ");
ch=getch();if(ch=='e'||ch=='E'){ break;}
count1=0; y=11; count1=0; winbox1();
}
}
}setcolor(WHITE);outtextxy(210,325,"Press any key to back."); setcolor(WHITE);
getch(); submain(); Swindow(); subshow();
}
void winbox1(void)
{
setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,100,495,380);
setfillstyle(SOLID_FILL,DARKGRAY); bar(140,110,485,370);
setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,112,483,123);
setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
outtextxy(433,114,"_ [] X");outtextxy(145,114,"WINER LIST BOX");
setcolor(WHITE);outtextxy(160,130,"WINER NAME");
outtextxy(380,130,"LOOSER NAME ");setcolor(BLACK);
line(150,147,477,147);setcolor(RED);
}
#include<stdio.h> #include<conio.h> #include<graphics.h> #include<process.h> #include<dos.h> #define ESC 0x1b #define ENT 13 #define TAB 9 #define LEFT 75 #define RIGHT 77 FILE *fs; struct winlist { char win[60]; char loss[60]; }; typedef struct winlist wk; long int SIZE =sizeof(wk); void Swindow(void); void HELP(void); void graf(void); int Clear(int ); int Refresh(int ); char sub_REFRESH(); void animation(void); void submain(void); void subshow(void); void result(void); void msgbox(void); int optionYN(void); void winbox(void); void winlist(void); void winbox1(void); int matrix[3][3]; int mat[3][3]; void main(void) { int i,j,a,gdriver = DETECT, gmode; char choice; initgraph(&gdriver, &gmode, "c:\\WINDOWS/Crossgam/"); // Change Driver Path as per your turbo C Graphics EGAVGA.BGI file animation(); exit(0); } void submain(void) { int flag=0,i,j,a; char choice; Swindow(); subshow(); input: fflush(stdin); choice=getch(); setfillstyle(SOLID_FILL,BLACK); bar(300,400,600,430); if(choice==ESC){ HELP(); goto input; } if(choice=='0'){msgbox();} if(choice=='s'||choice=='S'){winbox1();winlist();} if(choice=='7' && flag==0 && mat[1][1]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(240,160,"X"); flag=1; matrix[1][1]=1,mat[1][1]=1; if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3]) { setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1]) { setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3]) { setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='7' && flag==1&& mat[1][1]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(240,160,"O"); flag=0; matrix[1][1]=2,mat[1][1]=1; if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3]) { setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1]) { setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3]) { setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='8' && flag==0&& mat[1][2]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(305,160,"X"); flag=1; matrix[1][2]=1,mat[1][2]=1; if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3]) { setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag); } else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2]) { setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='8' && flag==1&& mat[1][2]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(305,160,"O"); flag=0; matrix[1][2]=2,mat[1][2]=1; if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3]) { setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag); } else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2]) { setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='9' && flag==0&& mat[1][3]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(370,160,"X"); flag=1; matrix[1][3]=1,mat[1][3]=1; if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3]) { setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3]) { setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1]) { setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='9' && flag==1&& mat[1][3]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(370,160,"O"); flag=0; matrix[1][3]=2,mat[1][3]=1; if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3]) { setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3]) { setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1]) { setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='4' && flag==0&& mat[2][1]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(240,215,"X"); flag=1; matrix[2][1]=1,mat[2][1]=1; if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1]) { setcolor(CYAN); line(245,150,245,300);flag=Refresh(flag); } else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3]) { setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag); } else result(); goto input; } else if(choice=='4' && flag==1&& mat[2][1]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(240,215,"O"); flag=0; matrix[2][1]=2,mat[2][1]=1; if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1]) { setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag); } else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3]) { setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag); } else result(); goto input; } else if(choice=='5' && flag==0&& mat[2][2]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(305,215,"X"); flag=1; matrix[2][2]=1,mat[2][2]=1; if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2]) { setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag); } else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3]) { setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3]) { setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1]) { setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='5' && flag==1&& mat[2][2]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(305,215,"O"); flag=0; matrix[2][2]=2,mat[2][2]=1; if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2]) { setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag); } else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3]) { setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3]) { setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1]) { setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='6' && flag==0&& mat[2][3]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(370,215,"X"); flag=1; matrix[2][3]=1,mat[2][3]=1; if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3]) { setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag); } else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3]) { setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag); } else result(); goto input; } else if(choice=='6' && flag==1&& mat[2][3]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(370,215,"O"); flag=0; matrix[2][3]=2,mat[2][3]=1; if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3]) { setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag); } else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3]) { setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag); } else result(); goto input; } else if(choice=='1' && flag==0&& mat[3][1]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(240,270,"X"); flag=1; matrix[3][1]=1,mat[3][1]=1; if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1]) { setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1]) { setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag); } else if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3]) { setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag); } else result(); goto input; } else if(choice=='1' && flag==1&& mat[3][1]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(240,270,"O"); flag=0; matrix[3][1]=2,mat[3][1]=1; if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1]) { setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1]) { setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag); } else if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3]) { setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag); } else result(); goto input; } else if(choice=='2' && flag==0&& mat[3][2]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(305,270,"X"); flag=1; matrix[3][2]=1,mat[3][2]=1; if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3]) { setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag); } else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2]) { setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='2' && flag==1&& mat[3][2]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(305,270,"O"); flag=0; matrix[3][2]=2,mat[3][2]=1; if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3]) { setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag); } else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2]) { setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='3' && flag==0&& mat[3][3]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(370,270,"X"); flag=1; matrix[3][3]=1,mat[3][3]=1; if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3]) { setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3]) { setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3]) { setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='3' && flag==1&& mat[3][3]==0) { setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(370,270,"O"); flag=0; matrix[3][3]=2,mat[3][3]=1; if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3]) { setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag); } else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3]) { setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag); } else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3]) { setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag); } else result(); goto input; } else if(choice=='R'||choice=='r') { a=1; for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}} flag=0;Swindow(); for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}} graf(); flag=Clear(flag); goto input; } else { sound(2589); delay(150);nosound();setcolor(GREEN); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);outtextxy(300,400,"Invalid key press"); goto input; } stop : closegraph(); _exit(0); } void Swindow(void) { cleardevice(); setcolor(RED); settextstyle(DEFAULT_FONT,HORIZ_DIR,3); outtextxy(30,50,"CROSS PUZZLE MIXING GAME"); setcolor(WHITE); line(225,190,400,190); line(225,250,400,250); line(275,150,275,300); line(350,150,350,300); setcolor(YELLOW); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); outtextxy(25,450,"press `Esc' to Help. press `0'(zero) to exit. press `R' to restart."); outtextxy(25,470,"Press `S' To Show the Winer List"); setcolor(GREEN); outtextxy(50,400,"ENTER VALUE :"); } int Refresh(int flag) { int i,j,a=5; for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}} while(!kbhit()) { if(flag==0) { sound(200); gotoxy(50,24); printf("SECOND PLAYER IS WINER"); delay(1000);nosound(); } else { sound(200); gotoxy(50,24); printf("FIRST PLAYER IS WINER"); delay(1000);nosound(); } gotoxy(50,24); printf(" "); delay(500); } winbox(); flag=0;sub_REFRESH(getch());graf();Swindow(); for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}} return flag; } int Clear(int flag) { int i,j,a=5; for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}} flag=0; Swindow(); return flag; } void HELP(void) { int i=50; cleardevice(); setfillstyle(SOLID_FILL,LIGHTGRAY); bar(0,0,getmaxx(),getmaxy()); setcolor(YELLOW); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(50,25,"THE INSTRUCTIONS TO PLAY THE GAME"); setcolor(MAGENTA); outtextxy(380,100,"X"); outtextxy(387,118,"O"); setcolor(BLUE); outtextxy(220,185,"7 8 9"); outtextxy(220,225,"4 5 6"); outtextxy(220,275,"1 2 3");settextstyle(DEFAULT_FONT,HORIZ_DIR,1); setcolor(BLACK); outtextxy(50,90,"[*] Two players must need to play this game."); outtextxy(50,105,"[*] First player holds the simbol of ."); outtextxy(50,120,"[*] Second player holds the simbol of ."); outtextxy(50,320,"[*] Which player creats a straight line into the box, he is the winer."); outtextxy(50,335,"[*] To restart the game as fresh, press `R'."); outtextxy(50,350,"[*] press `0' (zero) to exit the game."); outtextxy(330,460,"press any key to return back into game"); line(250,170,250,300);line(320,170,320,300); line(200,210,375,210);line(200,260,375,260); setcolor(RED); outtextxy(150,150,"The Keywords which contains the value of puzzle box"); setcolor(LIGHTGREEN);settextstyle(DEFAULT_FONT,HORIZ_DIR,2); while(!kbhit()) { while(!kbhit()) { outtextxy(125,400,"Made By - Subroto Mondal"); sound(i);delay(500);bar(123,398,520,435); delay(500);i=i+15; } nosound(); } Swindow();subshow(); } void graf(void) { int X=160,i=0; cleardevice();setfillstyle(SOLID_FILL,BLUE); bar(150,220,465,235);setfillstyle(SOLID_FILL,LIGHTGREEN); bar(155,215,470,230);delay(500); while(i<24) { setfillstyle(INTERLEAVE_FILL,RED); bar(X,218,X+10,228);i++;X=X+13; delay(50); } setfillstyle(SOLID_FILL,DARKGRAY); bar(180,185,460,200); } char sub_REFRESH(char ch) { int i,j,flag,a=5; if (ch=='R'||ch=='r') { a=5; for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}} flag=0; Swindow(); for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}} flag=Clear(flag); } else if(ch=='0') { a=5; for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}} for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}} msgbox(); } else { sound(2589);delay(150); nosound(); setcolor(GREEN); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); outtextxy(300,400,"Invalid key press"); } return 0; } void animation(void) { int x=120,y=55,i,x1=500,y1=55,x2=320,y2=40,x3=130,y3=230; setfillstyle(SOLID_FILL,WHITE);bar(0,0,getmaxx(),getmaxy()); delay(1000); while(!kbhit()) { setcolor(BLACK);circle(x,y,50);circle(x1,y1,50); x=x+1,y=y+1,x1=x1-1,y1=y1+1; delay(9); if(y==430) { setcolor(LIGHTBLUE);settextstyle(TRIPLEX_FONT,HORIZ_DIR,3); for(i=1;i<=3;i++) { bar(90,235,700,265);delay(200); outtextxy(90,235,"Wel Come To Cross Pazzel Mixing Game"); delay(1000); } delay(500);bar(0,0,getmaxx(),getmaxy()); setcolor(RED); while(!kbhit()) { circle(x2,y2,50);circle(x3,y3,50); y2=y2+2,x3=x3+2;delay(20); if(y2==430) { setcolor(BLACK);settextstyle(DEFAULT_FONT,HORIZ_DIR,1); outtextxy(385,6,"Compiled With :Terbo C++"); outtextxy(385,20,"Graphics :Borland Graphics C++"); delay(1000); goto point; } } } } point: submain(); } void subshow(void) { if(matrix[1][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,160,"X");} if(matrix[1][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,160,"O");} if(matrix[1][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,160,"X");} if(matrix[1][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,160,"O");} if(matrix[1][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,160,"X");} if(matrix[1][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,160,"O");} if(matrix[2][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,215,"X");} if(matrix[2][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,215,"O");} if(matrix[2][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,215,"X");} if(matrix[2][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,215,"O");} if(matrix[2][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,215,"X");} if(matrix[2][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,215,"O");} if(matrix[3][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,270,"X");} if(matrix[3][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,270,"O");} if(matrix[3][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,270,"X");} if(matrix[3][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,270,"O");} if(matrix[3][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,270,"X");} if(matrix[3][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,270,"O");} } void result (void) { int a,i,j,flag; if(mat[1][1]==1&&mat[1][2]==1&&mat[1][3]==1&&mat[2][1]==1&&mat[2][2]==1&&mat[2][3]==1&&mat[3][1]==1&&mat[3][2]==1&&mat[3][3]==1) { sound(2589); delay(150);nosound();setcolor(GREEN); while(!kbhit()) { settextstyle(DEFAULT_FONT,HORIZ_DIR,1);outtextxy(250,400,"Incomplite game press any key to reset the game"); delay(500); bar(240,390,900,410); delay(100); } graf(); a=5; for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}} flag=0;for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}} flag=Clear(flag);submain(); } } void msgbox(void) { int CHOICE,i,j,a,flag; setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,200,495,350); setfillstyle(SOLID_FILL,DARKGRAY); bar(140,210,485,340); setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,212,483,223); setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); outtextxy(433,214,"_ [] X");outtextxy(145,214,"Meassage Box"); setcolor(WHITE);outtextxy(180,250,"Are You Want To Sure Quit Game?"); outtextxy(210,310,"Press TAB To Select Option."); outtextxy(210,325,"Press Enter To Select Choice.");CHOICE=optionYN(); if(CHOICE==1){closegraph();exit(0);}else{submain();} } int optionYN(void) { int CHOICE,ch; input: CHOICE=0; settextstyle(DEFAULT_FONT,HORIZ_DIR,1); setfillstyle(SOLID_FILL,DARKGRAY);bar(320,280,370,300); setfillstyle(SOLID_FILL,BLACK); bar(395,280,445,300); setfillstyle(SOLID_FILL,WHITE); bar(325,275,375,295); bar(400,275,450,295);setcolor(GREEN); outtextxy(340,282,"YES");settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(410,278,"NO"); fflush(stdin); ch=getch(); if(ch==TAB||ch==LEFT) { settextstyle(DEFAULT_FONT,HORIZ_DIR,1); setfillstyle(SOLID_FILL,BLACK);bar(320,280,370,300); setfillstyle(SOLID_FILL,DARKGRAY);bar(395,280,445,300); setfillstyle(SOLID_FILL,WHITE);bar(325,275,375,295); bar(400,275,450,295);setcolor(GREEN); outtextxy(420,282,"NO");settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(328,278,"YES");CHOICE=1; if(getch()==ENT){return CHOICE;}else{goto input;} } if(ch==ENT){return CHOICE; }else{ goto input; } } void winbox(void) { wk w; char ch; int CHOICE,i,j,a,flag; setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,200,495,350); setfillstyle(SOLID_FILL,DARKGRAY); bar(140,210,485,340); setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,212,483,223); setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); outtextxy(433,214,"_ [] X");outtextxy(145,214,"Meassage Box"); setcolor(WHITE);outtextxy(160,250,"ENTER WINER NAME :-"); outtextxy(160,280,"ENTER LOOSER NAME :-"); outtextxy(210,325,"Press Enter To Save This Record."); setcolor(WHITE); outtextxy(140,230," Press 'Y'to enter winer and losser name.."); getch(); ch=getch(); if(ch=='y'||ch=='Y') { gotoxy(41,16); fflush(stdin); gets(w.win); gotoxy(41,18); fflush(stdin); gets(w.loss); fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","ab"); fwrite(&w,SIZE,1,fs); fclose(fs); } else { setfillstyle(SOLID_FILL,DARKGRAY); bar(200,320,485,340); outtextxy(210,325,"The record is not save.."); } } void winlist(void) { int x=24,y=11,x1=45,x2=40,c=1,count=0,count1=0,ch; wk w; winbox1(); fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","r"); if(fs==NULL) { outtextxy(225,230,"NO DATA FILE WAS FOUND"); } else { while (fread(&w,SIZE,1,fs)==1) { count++; if(count==0) outtextxy(225,230,"NO RECORD WAS FOUND"); } fclose(fs); fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","r"); while(fread(&w,SIZE,1,fs)==1) { gotoxy(x-5,y);printf("%d.)",c); gotoxy(x,y);puts(w.win); gotoxy(x2,y);printf("Vs"); gotoxy(x1,y);puts(w.loss); y=y+1; c++; count1++; if(count1==10) { gotoxy(19,23); printf("Press enter key to continue & `E' to exit "); ch=getch();if(ch=='e'||ch=='E'){ break;} count1=0; y=11; count1=0; winbox1(); } } }setcolor(WHITE);outtextxy(210,325,"Press any key to back."); setcolor(WHITE); getch(); submain(); Swindow(); subshow(); } void winbox1(void) { setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,100,495,380); setfillstyle(SOLID_FILL,DARKGRAY); bar(140,110,485,370); setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,112,483,123); setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); outtextxy(433,114,"_ [] X");outtextxy(145,114,"WINER LIST BOX"); setcolor(WHITE);outtextxy(160,130,"WINER NAME"); outtextxy(380,130,"LOOSER NAME ");setcolor(BLACK); line(150,147,477,147);setcolor(RED); }
 #include<stdio.h>
 #include<conio.h>
 #include<graphics.h>
 #include<process.h>
 #include<dos.h>

 #define ESC 0x1b
 #define ENT 13
 #define TAB 9
 #define LEFT 75
 #define RIGHT 77

 FILE *fs;

 struct winlist
 {
	char win[60];
	char loss[60];
 };
 typedef struct winlist wk;
 long int SIZE =sizeof(wk);

 void Swindow(void);
 void HELP(void);
 void graf(void);
 int Clear(int );
 int Refresh(int );
 char sub_REFRESH();
 void animation(void);
 void submain(void);
 void subshow(void);
 void result(void);
 void msgbox(void);
 int optionYN(void);
 void winbox(void);
 void winlist(void);
 void winbox1(void);

 int matrix[3][3];
 int mat[3][3];
 void main(void)
 {

	int i,j,a,gdriver = DETECT, gmode;
	char choice;
	initgraph(&gdriver, &gmode, "c:\\WINDOWS/Crossgam/"); // Change Driver Path as per your turbo C Graphics EGAVGA.BGI file
	animation();
	exit(0);
 }
 void submain(void)
 {
	int flag=0,i,j,a;
	char choice;
	Swindow();
	subshow();
 input:
	fflush(stdin);
	choice=getch();
	setfillstyle(SOLID_FILL,BLACK);
	bar(300,400,600,430);
   if(choice==ESC){   HELP();  goto input;  }
   if(choice=='0'){msgbox();}
   if(choice=='s'||choice=='S'){winbox1();winlist();}
   if(choice=='7' && flag==0 && mat[1][1]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(240,160,"X");  flag=1;  matrix[1][1]=1,mat[1][1]=1;
   if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
   {
	setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
   {
	setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='7' && flag==1&& mat[1][1]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(240,160,"O");  flag=0;  matrix[1][1]=2,mat[1][1]=1;
   if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
   {
	setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
   {
	setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='8' && flag==0&& mat[1][2]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(305,160,"X");  flag=1;  matrix[1][2]=1,mat[1][2]=1;
   if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
   {
   setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
   }
   else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
   {
   setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='8' && flag==1&& mat[1][2]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(305,160,"O");  flag=0;  matrix[1][2]=2,mat[1][2]=1;
   if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
   {
   setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
   }
   else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
   {
   setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='9' && flag==0&& mat[1][3]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(370,160,"X");  flag=1;  matrix[1][3]=1,mat[1][3]=1;
   if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
   {
	setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
   {
	setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
   {
	setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='9' && flag==1&& mat[1][3]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(370,160,"O");  flag=0;  matrix[1][3]=2,mat[1][3]=1;
   if(matrix[1][1]==matrix[1][2] && matrix[1][2]==matrix[1][3])
   {
	setcolor(CYAN); line(220,170,410,170); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
   {
	setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
   {
	setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='4' && flag==0&& mat[2][1]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(240,215,"X");  flag=1;  matrix[2][1]=1,mat[2][1]=1;
   if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
   {
   setcolor(CYAN); line(245,150,245,300);flag=Refresh(flag);
   }
   else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
   {
   setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='4' && flag==1&& mat[2][1]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(240,215,"O");  flag=0;  matrix[2][1]=2,mat[2][1]=1;
   if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
   {
   setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
   }
   else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
   {
   setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='5' && flag==0&& mat[2][2]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(305,215,"X");  flag=1;  matrix[2][2]=1,mat[2][2]=1;
   if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
   {
   setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
   }
   else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
   {
   setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
   {
	setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='5' && flag==1&& mat[2][2]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(305,215,"O");  flag=0;  matrix[2][2]=2,mat[2][2]=1;
   if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
   {
   setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
   }
   else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
   {
   setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
   {
	setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='6' && flag==0&& mat[2][3]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(370,215,"X");  flag=1;  matrix[2][3]=1,mat[2][3]=1;
   if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
   {
	setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
   }
   else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
   {
   setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='6' && flag==1&& mat[2][3]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(370,215,"O");  flag=0;  matrix[2][3]=2,mat[2][3]=1;
   if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
   {
	setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
   }
   else if(matrix[2][1]==matrix[2][2] && matrix[2][2]==matrix[2][3])
   {
   setcolor(CYAN); line(235,215,400,215); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='1' && flag==0&& mat[3][1]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(240,270,"X");  flag=1;  matrix[3][1]=1,mat[3][1]=1;
   if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
   {
   setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
   {
	setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
   }
   else if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='1' && flag==1&& mat[3][1]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(240,270,"O");  flag=0;  matrix[3][1]=2,mat[3][1]=1;
   if(matrix[1][1]==matrix[2][1] && matrix[2][1]==matrix[3][1])
   {
   setcolor(CYAN); line(245,150,245,300); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][2] && matrix[2][2]==matrix[3][1])
   {
	setcolor(CYAN); line(390,150,220,300); flag=Refresh(flag);
   }
   else if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='2' && flag==0&& mat[3][2]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(305,270,"X");  flag=1;  matrix[3][2]=1,mat[3][2]=1;
   if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
   }
   else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
   {
   setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='2' && flag==1&& mat[3][2]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(305,270,"O");  flag=0;  matrix[3][2]=2,mat[3][2]=1;
   if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
   }
   else if(matrix[1][2]==matrix[2][2] && matrix[2][2]==matrix[3][2])
   {
   setcolor(CYAN); line(315,150,315,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='3' && flag==0&& mat[3][3]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(370,270,"X");  flag=1;  matrix[3][3]=1,mat[3][3]=1;
   if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
   {
	setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='3' && flag==1&& mat[3][3]==0)
   {
   setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
   outtextxy(370,270,"O");  flag=0;  matrix[3][3]=2,mat[3][3]=1;
   if(matrix[3][1]==matrix[3][2] && matrix[3][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,275,400,275); flag=Refresh(flag);
   }
   else if(matrix[1][3]==matrix[2][3] && matrix[2][3]==matrix[3][3])
   {
	setcolor(CYAN); line(375,150,375,300); flag=Refresh(flag);
   }
   else if(matrix[1][1]==matrix[2][2] && matrix[2][2]==matrix[3][3])
   {
	setcolor(CYAN); line(235,150,410,300); flag=Refresh(flag);
   }
   else
   result();
   goto input;
   }
   else if(choice=='R'||choice=='r')
   {
	 a=1;
	 for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
	 flag=0;Swindow();
	 for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
	 graf();
	 flag=Clear(flag); goto input;
   }
   else
   {
	sound(2589); delay(150);nosound();setcolor(GREEN);
	settextstyle(DEFAULT_FONT,HORIZ_DIR,1);outtextxy(300,400,"Invalid key press");   goto input;
   }
	stop :  closegraph();  _exit(0);
 }
 void Swindow(void)
 {
 cleardevice();
 setcolor(RED); settextstyle(DEFAULT_FONT,HORIZ_DIR,3);
 outtextxy(30,50,"CROSS PUZZLE MIXING GAME");
 setcolor(WHITE);
 line(225,190,400,190); line(225,250,400,250);
 line(275,150,275,300); line(350,150,350,300);
 setcolor(YELLOW); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
 outtextxy(25,450,"press `Esc' to Help.     press  `0'(zero) to exit.    press `R' to restart.");
 outtextxy(25,470,"Press `S' To Show the Winer List");
 setcolor(GREEN);  outtextxy(50,400,"ENTER  VALUE :");
 }

 int Refresh(int flag)
 {
	int i,j,a=5;
	for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
	while(!kbhit())
	{
	   if(flag==0)
	   {
		 sound(200);
		 gotoxy(50,24);   printf("SECOND  PLAYER  IS  WINER");
		 delay(1000);nosound();
	   }
	   else
	   {
		sound(200);
		gotoxy(50,24);   printf("FIRST  PLAYER  IS  WINER");
		delay(1000);nosound();
	   }
	   gotoxy(50,24);   printf("                             ");
	   delay(500);
	}
	winbox();
	flag=0;sub_REFRESH(getch());graf();Swindow();
	for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
	return flag;
  }
 int Clear(int flag)
 {
	int i,j,a=5;
	for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
	flag=0; Swindow(); return flag;
 }

 void HELP(void)
 {
  int i=50;
  cleardevice();
  setfillstyle(SOLID_FILL,LIGHTGRAY);
  bar(0,0,getmaxx(),getmaxy()); setcolor(YELLOW);
  settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
  outtextxy(50,25,"THE INSTRUCTIONS TO PLAY THE GAME");
  setcolor(MAGENTA); outtextxy(380,100,"X");
  outtextxy(387,118,"O"); setcolor(BLUE);
  outtextxy(220,185,"7   8   9"); outtextxy(220,225,"4   5   6");
  outtextxy(220,275,"1   2   3");settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
  setcolor(BLACK);
  outtextxy(50,90,"[*]   Two players must need to play this game.");
  outtextxy(50,105,"[*]   First player holds the simbol of      .");
  outtextxy(50,120,"[*]   Second player holds the simbol of      .");
  outtextxy(50,320,"[*]   Which player creats a straight line into the box, he is the winer.");
  outtextxy(50,335,"[*]   To restart the game as fresh, press  `R'.");
  outtextxy(50,350,"[*]   press  `0' (zero)  to exit the game.");
  outtextxy(330,460,"press any key to return back into game");
  line(250,170,250,300);line(320,170,320,300);
  line(200,210,375,210);line(200,260,375,260);
  setcolor(RED);
  outtextxy(150,150,"The Keywords which contains the value of puzzle box");
  setcolor(LIGHTGREEN);settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
	while(!kbhit())
	{
	   while(!kbhit())
	   {
		 outtextxy(125,400,"Made By - Subroto  Mondal");
		 sound(i);delay(500);bar(123,398,520,435); delay(500);i=i+15;
	   }
	   nosound();
	}
	Swindow();subshow();
 }
	void graf(void)
	{
		int X=160,i=0;
		cleardevice();setfillstyle(SOLID_FILL,BLUE);
		bar(150,220,465,235);setfillstyle(SOLID_FILL,LIGHTGREEN);
		bar(155,215,470,230);delay(500);
		while(i<24)
		{
			setfillstyle(INTERLEAVE_FILL,RED);
			bar(X,218,X+10,228);i++;X=X+13;
			delay(50);
		}
		setfillstyle(SOLID_FILL,DARKGRAY);
		bar(180,185,460,200);
	}
 char sub_REFRESH(char ch)
 {
	  int i,j,flag,a=5;
	  if (ch=='R'||ch=='r')
	  {
		a=5;
		for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
		flag=0; Swindow();
		for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
		flag=Clear(flag);
	  }

	  else if(ch=='0')
	  {
		a=5;
		for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
		for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
		msgbox();
	  }
	  else
	  {
		sound(2589);delay(150);	nosound(); setcolor(GREEN);
		settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
		outtextxy(300,400,"Invalid key press");
	  }
	  return 0;
 }
 void animation(void)
 {
	 int x=120,y=55,i,x1=500,y1=55,x2=320,y2=40,x3=130,y3=230;
	 setfillstyle(SOLID_FILL,WHITE);bar(0,0,getmaxx(),getmaxy());
	 delay(1000);
	while(!kbhit())
	{
		setcolor(BLACK);circle(x,y,50);circle(x1,y1,50);
		x=x+1,y=y+1,x1=x1-1,y1=y1+1; delay(9);
		if(y==430)
		{
			setcolor(LIGHTBLUE);settextstyle(TRIPLEX_FONT,HORIZ_DIR,3);
			for(i=1;i<=3;i++)
			{
				bar(90,235,700,265);delay(200);
				outtextxy(90,235,"Wel Come To Cross Pazzel Mixing Game");
				delay(1000);
			}
		delay(500);bar(0,0,getmaxx(),getmaxy());
		setcolor(RED);
		while(!kbhit())
		{
			circle(x2,y2,50);circle(x3,y3,50);
			y2=y2+2,x3=x3+2;delay(20);
			if(y2==430)
			{
				setcolor(BLACK);settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
				outtextxy(385,6,"Compiled With :Terbo C++");
				outtextxy(385,20,"Graphics :Borland Graphics C++");
				delay(1000);
				goto point;
			}
		}

	}
 }
 point:
 submain();
}
void subshow(void)
{
	if(matrix[1][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,160,"X");}
	if(matrix[1][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,160,"O");}
	if(matrix[1][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,160,"X");}
	if(matrix[1][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,160,"O");}
	if(matrix[1][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,160,"X");}
	if(matrix[1][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,160,"O");}
	if(matrix[2][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,215,"X");}
	if(matrix[2][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,215,"O");}
	if(matrix[2][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,215,"X");}
	if(matrix[2][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,215,"O");}
	if(matrix[2][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,215,"X");}
	if(matrix[2][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,215,"O");}
	if(matrix[3][1]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,270,"X");}
	if(matrix[3][1]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(240,270,"O");}
	if(matrix[3][2]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,270,"X");}
	if(matrix[3][2]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(305,270,"O");}
	if(matrix[3][3]==1){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,270,"X");}
	if(matrix[3][3]==2){setcolor(MAGENTA); settextstyle(DEFAULT_FONT,HORIZ_DIR,2);outtextxy(370,270,"O");}

}
void result (void)
{
	int a,i,j,flag;
	if(mat[1][1]==1&&mat[1][2]==1&&mat[1][3]==1&&mat[2][1]==1&&mat[2][2]==1&&mat[2][3]==1&&mat[3][1]==1&&mat[3][2]==1&&mat[3][3]==1)
	{
	sound(2589); delay(150);nosound();setcolor(GREEN);
	while(!kbhit())
	{
	settextstyle(DEFAULT_FONT,HORIZ_DIR,1);outtextxy(250,400,"Incomplite game press any key to reset the game");
	delay(500);
	bar(240,390,900,410);
	delay(100);
	}
	graf();
	a=5;
	for(i=1;i<=3;i++){for(j=1;j<=3;j++){matrix[i][j]=a;a++;}}
	flag=0;for(i=1;i<=3;i++){for(j=1;j<=3;j++){mat[i][j]=0;}}
	flag=Clear(flag);submain();
	}
}
 void msgbox(void)
 {
 int CHOICE,i,j,a,flag;
   setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,200,495,350);
   setfillstyle(SOLID_FILL,DARKGRAY); bar(140,210,485,340);
   setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,212,483,223);
   setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
   outtextxy(433,214,"_ [] X");outtextxy(145,214,"Meassage Box");
   setcolor(WHITE);outtextxy(180,250,"Are You Want To Sure Quit Game?");
   outtextxy(210,310,"Press TAB To Select Option.");
   outtextxy(210,325,"Press Enter To Select Choice.");CHOICE=optionYN();
  if(CHOICE==1){closegraph();exit(0);}else{submain();}
 }
  int optionYN(void)
 {
	int CHOICE,ch;
	input:
	CHOICE=0;
 settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
 setfillstyle(SOLID_FILL,DARKGRAY);bar(320,280,370,300);
 setfillstyle(SOLID_FILL,BLACK); bar(395,280,445,300);
 setfillstyle(SOLID_FILL,WHITE); bar(325,275,375,295);
 bar(400,275,450,295);setcolor(GREEN);
 outtextxy(340,282,"YES");settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
 outtextxy(410,278,"NO"); fflush(stdin);
	ch=getch();
	if(ch==TAB||ch==LEFT)
	{
	settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
	setfillstyle(SOLID_FILL,BLACK);bar(320,280,370,300);
	setfillstyle(SOLID_FILL,DARKGRAY);bar(395,280,445,300);
	setfillstyle(SOLID_FILL,WHITE);bar(325,275,375,295);
	bar(400,275,450,295);setcolor(GREEN);
	outtextxy(420,282,"NO");settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
	outtextxy(328,278,"YES");CHOICE=1;
	if(getch()==ENT){return CHOICE;}else{goto input;}
	}
  if(ch==ENT){return CHOICE; }else{ goto input; }
 }

void winbox(void)
{
	wk w;
	char ch;
 int CHOICE,i,j,a,flag;
   setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,200,495,350);
   setfillstyle(SOLID_FILL,DARKGRAY); bar(140,210,485,340);
   setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,212,483,223);
   setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
   outtextxy(433,214,"_ [] X");outtextxy(145,214,"Meassage Box");
   setcolor(WHITE);outtextxy(160,250,"ENTER WINER NAME  :-");
   outtextxy(160,280,"ENTER LOOSER NAME :-");
   outtextxy(210,325,"Press Enter To Save This Record.");
   setcolor(WHITE);
   outtextxy(140,230," Press 'Y'to enter winer and losser name..");
   getch();
   ch=getch();
   if(ch=='y'||ch=='Y')
   {
	  gotoxy(41,16);  fflush(stdin);
	  gets(w.win); gotoxy(41,18);
	  fflush(stdin); gets(w.loss);
	  fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","ab");
	  fwrite(&w,SIZE,1,fs); fclose(fs);
   }
   else
   {
	setfillstyle(SOLID_FILL,DARKGRAY); bar(200,320,485,340);
	outtextxy(210,325,"The record is not save..");
   }
 }
 void winlist(void)
 {  int x=24,y=11,x1=45,x2=40,c=1,count=0,count1=0,ch;
	wk w;
	winbox1();
   fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","r");
   if(fs==NULL)
   {
	 outtextxy(225,230,"NO DATA FILE WAS FOUND");
   }
   else
   {
	   while (fread(&w,SIZE,1,fs)==1)
	   {
		count++;
		if(count==0)
		outtextxy(225,230,"NO RECORD WAS FOUND");
	   }
	   fclose(fs);
	   fs=fopen("c:\\WINDOWS/CROSSGAM/DATA.DAT","r");
	   while(fread(&w,SIZE,1,fs)==1)
	   {
		gotoxy(x-5,y);printf("%d.)",c);
		gotoxy(x,y);puts(w.win);
		gotoxy(x2,y);printf("Vs");
		gotoxy(x1,y);puts(w.loss);
		y=y+1;	c++;	count1++;
		if(count1==10)
		{
		  gotoxy(19,23);
		  printf("Press enter key to continue & `E' to exit ");
		  ch=getch();if(ch=='e'||ch=='E'){ break;}
		  count1=0;  y=11;  count1=0;  winbox1();
		}
	   }

   }setcolor(WHITE);outtextxy(210,325,"Press any key to back.");  setcolor(WHITE);
   getch(); submain(); Swindow();  subshow();
 }
 void winbox1(void)
 {
	setfillstyle(INTERLEAVE_FILL,BROWN);bar(130,100,495,380);
   setfillstyle(SOLID_FILL,DARKGRAY); bar(140,110,485,370);
   setfillstyle(SOLID_FILL,LIGHTCYAN);bar(142,112,483,123);
   setcolor(BLACK); settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
   outtextxy(433,114,"_ [] X");outtextxy(145,114,"WINER LIST BOX");
   setcolor(WHITE);outtextxy(160,130,"WINER NAME");
   outtextxy(380,130,"LOOSER NAME ");setcolor(BLACK);
   line(150,147,477,147);setcolor(RED);
 }

Download Entire Project and Setup File Here

Click Here to download Criss-Cross Game

The following two tabs change content below.

Subroto Mondal

Chief Coordinator HR&CR
I like Programming and New Technologies. And work with Linux.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.