Computer Hope
Microsoft => Microsoft DOS => Topic started by: xdao on August 16, 2008, 09:08:07 PM
-
two player play it
@echo off
mode con cols=48 lines=23
color f0
set ab= ┏━━━━━━━━━━━━━━━━━━━━┓
set ac= ┃ 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9┃
set a= ┃A ┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐┃
set b= ┃B ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set c= ┃C ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set d= ┃D ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set e= ┃E ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set f= ┃F ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set g= ┃G ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set h= ┃H ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set i= ┃I ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set j= ┃J ├┼┼┼┼┼┼┼┼╋┼┼┼┼┼┼┼┼┤┃
set k= ┃K ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set l= ┃L ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set m= ┃M ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set n= ┃N ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set o= ┃O ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set p= ┃P ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set q= ┃Q ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set r= ┃R ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤┃
set s= ┃S └┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┘┃
set ad= ┗━━━━━━━━━━━━━━━━━━━━┛
set shu=0
:start
echo %ab%
echo %ac%
echo %a%
echo %b%
echo %c%
echo %d%
echo %e%
echo %f%
echo %g%
echo %h%
echo %i%
echo %j%
echo %k%
echo %l%
echo %m%
echo %n%
echo %o%
echo %p%
echo %q%
echo %r%
echo %s%
echo %ad%
set qi=
set /p qi=输入要下棋的位置 如:10j
if "%qi%"=="" goto start
set lie=%qi:~0,-1%
set /a u=%lie%+4
set /a v=%lie%+5
set hang=%qi:~-1%
if %shu%==0 set sai=●
if %shu%==1 set sai=○
call set zi=%%%hang%:~%u%,1%%
if %lie% geq 1 (
if %lie% leq 19 (
if "%zi%"=="●" goto start
if "%zi%"=="○" goto start
call set %hang%=%%%hang%:~0,%u%%%%sai%%%%hang%:~%v%%%
for %%i in (0 1 2 3 4 5 6 7 8 9 t u v w x y z) do if %hang%==%%i goto start
if %shu%==0 (
set shu=1
) else (
set shu=0
)
)
)
goto start
-
I don't get it......are you showing it to us or do you have a problem with it?
-
It is a game,a chess game for two person to play.
As known as gobang chess.
-
Fascinating...
-
.....how do I get it to work?
-
copy all lines in the code area ,
save it as a batch file(.bat)
run it
there is a prompt to tel you to input the location(like coordinates) where place the chess pieces.
the prompt is in Chinese.
I tried to translate it into English(as follows):
Chinese:
set /p qi=输入要下棋的位置 如:10j
English:
set /p qi=Please input the location of chess like:10j
enjoy it!a batch file game.
-
Hmmmm......Doesn't work for me.
This is what I get:
(http://www.fileupyours.com/files/185178/untitled.JPG)
When I enter something, it closes.
-
Told ya it was fascinating...
-
xdao,I know this guy.
this batch work OK on my computer because of that both xdao and me are use
SC(Simplified Chinese) Windows.
the batch is design under the Chinese environment
-
Hmmmm.....that's a problem then.
I know at my dads office they have Chinese computers. I will have to try there.
-
Anyone else find this a bit odd?
-
How so?
-
It just strikes me as odd that someone would register for the sole purpose of posting a batch game.
-
The source code of this game is given,you can learn teh batch file grammar from it.