c语言点阵字符画,【教程】自创点阵形字符图形排列

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

@echo off

title 滚箱子

setlocal enabledelayedexpansion

color f0

rem 12 8

mode con cols=24 lines=10

for /l %%a in (1,1,96) do (set x%%a=◆)

set fangxiang=3

set xx=27

:game

set x14=□

set x15=□

set x16=□

set x26=□

set x27=□

set x28=□

set x29=□

set x30=□

set x31=□

set x38=□

set x39=□

set x40=□

set x41=□

set x42=□

set x43=□

set x44=□

set x45=□

set x46=□

set x51=□

set x52=□

set x53=□

set x54=□

set x55=□

set x56=□

set x57=□

set x58=□

set x59=□

set x67=□

set x68=□

set x69=◎

set x70=□

set x71=□

set x80=□

set x81=□

set x82=□

set x!xx!=█

if not "!fangxiang!"=="3" set x!xy!=█

if "%xx%"=="69" if "!fangxiang!"=="3" goto win

cls

echo %x1%%x2%%x3%%x4%%x5%%x6%%x7%%x8%%x9%%x10%%x11%%x12%%x13%%x14%%x15%%x16%%x17%%x18%%x19%%x20%%x21%%x22%%x23%%x24%%x25%%x26%%x27%%x28%%x29%%x30%%x31%%x32%%x33%%x34%%x35%%x36%%x37%%x38%%x39%%x40%%x41%%x42%%x43%%x44%%x45%%x46%%x47%%x48%%x49%%x50%%x51%%x52%%x53%%x54%%x55%%x56%%x57%%x58%%x59%%x60%%x61%%x62%%x63%%x64%%x65%%x66%%x67%%x68%%x69%%x70%%x71%%x72%%x73%%x74%%x75%%x76%%x77%%x78%%x79%%x80%%x81%%x82%%x83%%x84%%x85%%x86%%x87%%x88%%x89%%x90%%x91%%x92%%x93%%x94%%x95%%x96%

choice /c wsad /n >nul

set lingshi=%xx%

if "!errorlevel!"=="1" goto ch1

if "!errorlevel!"=="2" goto ch2

if "!errorlevel!"=="3" goto ch3

if "!errorlevel!"=="4" goto ch4

:ch1

if "%fangxiang%"=="1" goto ch1a1

if "%fangxiang%"=="2" goto ch1a2

if "%fangxiang%"=="3" goto ch1a3

:ch2

if "%fangxiang%"=="1" goto ch2a1

if "%fangxiang%"=="2" goto ch2a2

if "%fangxiang%"=="3" goto ch2a3

:ch3

if "%fangxiang%"=="1" goto ch3a1

if "%fangxiang%"=="2" goto ch3a2

if "%fangxiang%"=="3" goto ch3a3

:ch4

if "%fangxiang%"=="1" goto ch4a1

if "%fangxiang%"=="2" goto ch4a2

if "%fangxiang%"=="3" goto ch4a3

:ch1a1

set /a lingshi -=24

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set fangxiang=3

goto game

:ch1a2

set /a lingshi -=12

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set /a xy=%lingshi%+1

if "!x%xy%!"=="◆" goto loss

set fangxiang=2

goto game

:ch1a3

set /a lingshi -=24

if "!x%lingshi%!"=="◆" goto loss

set xy=%lingshi%

set /a xx=%lingshi%+12

if "!x%xy%!"=="◆" goto loss

set fangxiang=1

set fangxiang=1

goto game

:ch2a1

set /a lingshi +=12

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set fangxiang=3

goto game

:ch2a2

set /a lingshi +=12

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set /a xy=%lingshi%+1

if "!x%xy%!"=="◆" goto loss

set fangxiang=2

goto game

:ch2a3

set /a lingshi +=24

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set /a xy=%lingshi%-12

if "!x%xy%!"=="◆" goto loss

set fangxiang=1

goto game

:ch3a1

set /a lingshi -=1

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set /a xy=%lingshi%-12

if "!x%xy%!"=="◆" goto loss

set fangxiang=1

goto game

:ch3a2

set /a lingshi -=1

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set fangxiang=3

goto game

:ch3a3

set /a lingshi -=2

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set /a xy=%lingshi%+1

if "!x%xy%!"=="◆" goto loss

set fangxiang=2

goto game

:ch4a1

set /a lingshi +=1

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set /a xy=%lingshi%-12

if "!x%xy%!"=="◆" goto loss

set fangxiang=1

goto game

:ch4a2

set /a lingshi +=2

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set fangxiang=3

goto game

:ch4a3

set /a lingshi +=1

if "!x%lingshi%!"=="◆" goto loss

set xx=%lingshi%

set /a xy=%lingshi%+1

if "!x%xy%!"=="◆" goto loss

set fangxiang=2

goto game

:loss

cls

echo 你输了!

pause

exit

:win

cls

echo 你赢了!

pause

exit

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值