- @echo off
- setlocal enabledelayedexpansion
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::以下是片头
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- title "梭哈测试版 E-mail : [email=bizhuang0917@126.com]bizhuang0917@126.com[/email]"
- echo 程序载入中,请稍后……
- for /l %%i in (1,1,25) do set/p a=^><nul&ping /n 0 127.1>nul
- cls
- mode con lines=13
- color f8
- echo.
- echo.
- echo.
- echo.
- echo.
- echo 本程序仅用于学习交流,不得用于商业用途
- ping -n 2 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- echo **************************************************************
- echo * 欢迎使用梭哈测试版 *
- echo **************************************************************
- ping -n 2 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- echo.
- echo 作者: 小竹英雄
- ping -n 2 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- echo.
- echo 英雄软件工作室
- ping -n 2 127.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- echo.
- echo 版权所有,盗版或究
- ping -n 2 127.1>nul
- cls
- color E2
- echo.
- echo.
- echo.
- echo
- echo 按任意键进入游戏……
- pause>nul
- mode con lines=25
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::以下为投注
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :start
- set mymoney=1000
- set oncemoney=100
- :begin
- cls
- echo 赌神先生,您有赌资!mymoney!元
- echo 请投注
- set/p oncemoney=
- if !oncemoney! gtr !mymoney! echo 投注错误!&pause&goto begin
- if !oncemoney! leq 0 echo 投注错误!&pause&goto begin
- set /a mymoney=!mymoney!-!oncemoney!
- cls
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::以下发10张牌,其中有5张是用于交换牌时备用的。
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- for /l %%i in (1,1,52) do set a%%i=%%i
- set total=52
- set count=10
- ::发10张牌,其中有5张是备用的
- :1
- if %count% equ 0 goto 2
- set/a temp=%random%%%%total%+1
- set puke%count%=!a%temp%!
- set/a a%temp%=!a%total%!
- set/a total=%total%-1
- set/a count=%count%-1
- goto 1
- :2
- for /l %%i in (1,1,10) do (
- set/a tt=!puke%%i!-1
- set/a flag%%i=!tt!/13
- set/a puke%%i=!puke%%i!%%13+1
- set left%%i=!flag%%i!
- set right%%i=!puke%%i!
- if !puke%%i! equ 13 set puke%%i=A
- if !puke%%i! equ 12 set puke%%i=K
- if !puke%%i! equ 11 set puke%%i=Q
- if !puke%%i! equ 10 set puke%%i=J
- if !puke%%i! equ 9 set puke%%i=T
- if !puke%%i! equ 8 set puke%%i=9
- if !puke%%i! equ 7 set puke%%i=8
- if !puke%%i! equ 6 set puke%%i=7
- if !puke%%i! equ 5 set puke%%i=6
- if !puke%%i! equ 4 set puke%%i=5
- if !puke%%i! equ 3 set puke%%i=4
- if !puke%%i! equ 2 set puke%%i=3
- if !puke%%i! equ 1 set puke%%i=2
- if !flag%%i! equ 3 set puke%%i=黑桃:!puke%%i!
- if !flag%%i! equ 2 set puke%%i=红桃:!puke%%i!
- if !flag%%i! equ 1 set puke%%i=方块:!puke%%i!
- if !flag%%i! equ 0 set puke%%i=草花:!puke%%i!
- )
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::显示并让用户选择要交换的牌
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- echo 同花大顺×500 大顺×300 同花顺×100
- echo 顺子×50 同花×30 四条×20
- echo 葫芦×15 三条×10 两对×5
- echo ┏━━━━┓ ┏━━━━┓┏━━━━┓┏━━━━┓┏━━━━┓
- echo ┃!puke1! ┃ ┃!puke2! ┃┃!puke3! ┃┃!puke4! ┃┃!puke5! ┃
- echo ┃ ┃ ┃ ┃┃ ┃┃ ┃┃ ┃
- echo ┃ Super ┃ ┃ Super ┃┃ Super ┃┃ Super ┃┃ Super ┃
- echo ┃ Hero ┃ ┃ Hero ┃┃ Hero ┃┃ Hero ┃┃ Hero ┃
- echo ┃ ┃ ┃ ┃┃ ┃┃ ┃┃ ┃
- echo ┃ !puke1!┃ ┃ !puke2!┃┃ !puke3!┃┃ !puke4!┃┃ !puke5!┃
- echo ┗━━━━┛ ┗━━━━┛┗━━━━┛┗━━━━┛┗━━━━┛
- echo 1 2 3 4 5
- echo 请选择要交换的牌(用12345表示)
- set slt=
- for /l %%i in (1,1,5) do (
- set slt%%i=
- )
- set/p slt=
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::实现换牌
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- for /l %%i in (0,1,4) do (
- set/a k=%%i+1
- set slt!k!=!slt:~%%i,1!
- if not defined slt!k! goto 3
- )
- :3
- for /l %%i in (6,1,10) do (
- set/a vv=%%i-5
- set tleft!vv!=!left%%i!
- set tright!vv!=!right%%i!
- set tpuke!vv!=!puke%%i!
- )
- for /l %%j in (1,1,5) do (
- set left!slt%%j!=!tleft%%j!
- set right!slt%%j!=!tright%%j!
- set puke!slt%%j!=!tpuke%%j!
- )
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- echo ┏━━━━┓ ┏━━━━┓┏━━━━┓┏━━━━┓┏━━━━┓
- echo ┃!puke1! ┃ ┃!puke2! ┃┃!puke3! ┃┃!puke4! ┃┃!puke5! ┃
- echo ┃ ┃ ┃ ┃┃ ┃┃ ┃┃ ┃
- echo ┃ Super ┃ ┃ Super ┃┃ Super ┃┃ Super ┃┃ Super ┃
- echo ┃ Hero ┃ ┃ Hero ┃┃ Hero ┃┃ Hero ┃┃ Hero ┃
- echo ┃ ┃ ┃ ┃┃ ┃┃ ┃┃ ┃
- echo ┃ !puke1!┃ ┃ !puke2!┃┃ !puke3!┃┃ !puke4!┃┃ !puke5!┃
- echo ┗━━━━┛ ┗━━━━┛┗━━━━┛┗━━━━┛┗━━━━┛
- for /l %%i in (1,1,25) do set/p a=^><nul&ping /n 0 127.1>nul
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- set samecolor=0
- set bigline=0
- set samecolor=0
- set sameline=0
- set samefour=0
- set hulu=0
- set samethree=0
- set twocouples=0
- set str=
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::以下判断是否同花
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- if %left1% equ !left2! if !left2! equ !left3! if !left3! equ !left4! if !left4! equ !left5! set samecolor=1
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::以下判断是否为顺子
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- for /l %%i in (1,1,4) do (
- set/a w=%%i+1
- for /l %%j in (!w!,1,5) do (
- if !right%%i! lss !right%%j! (
- set/a tt=!right%%i!
- set/a right%%i=!right%%j!
- set/a right%%j=!tt! ) ) )
- ::以上为排序
- set/a t1=%right5%+1
- set/a t2=%right4%+1
- set/a t3=%right3%+1
- set/a t4=%right2%+1
- if %right4% equ %t1% if %right3% equ %t2% if %right2% equ %t3% if %right1% equ %t4% set sameline=1
- if !sameline! equ 1 if !right1! equ 13 set bigline=1
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::以下是判断是否为两对,三条,四条,葫芦
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- for /l %%i in (1,1,5) do (
- if !right%%i! equ 13 set right%%i=A
- if !right%%i! equ 12 set right%%i=K
- if !right%%i! equ 11 set right%%i=Q
- if !right%%i! equ 10 set right%%i=J
- if !right%%i! equ 9 set right%%i=T
- if !right%%i! equ 8 set right%%i=9
- if !right%%i! equ 7 set right%%i=8
- if !right%%i! equ 6 set right%%i=7
- if !right%%i! equ 5 set right%%i=6
- if !right%%i! equ 4 set right%%i=5
- if !right%%i! equ 3 set right%%i=4
- if !right%%i! equ 2 set right%%i=3
- if !right%%i! equ 1 set right%%i=2
- set str=!str!!right%%i!
- )
-
- for /l %%i in (1,1,4) do (
- set/a w=%%i+1
- for /l %%j in (!w!,1,5) do (
- if !right%%i! equ !right%%j! (
- set e1=!right%%i!
- set e2=!right%%j!
- goto 4
- )
- )
- )
- goto 5
- :4
- set str=!str:%e1%=0!
- set h1=!str:~0,1!
- set h2=!str:~1,1!
- set h3=!str:~2,1!
- set h4=!str:~3,1!
- set h5=!str:~4,1!
- set box=0
- for /l %%i in (1,1,5) do (
- if !h%%i! equ 0 set/a box+=1
- )
- if !box! equ 4 set samefour=1&goto 5
- if !box! equ 3 (
- set str=!str:0=!
- set m=!str:~0,1!
- )
- ::此时m就有值了,否则m的值不正确!
- if !box! equ 3 (
- set str=!str:%m%=0!
- if !str! equ 00 set hulu=1&goto 5
- set samethree=1&goto 5
- )
- set str=!str:0=!
- set g1=!str:~0,1!
- set g2=!str:~1,1!
- set g3=!str:~2,1!
- if !g1! equ !g2! if !g2! equ !g3! set hulu=1&goto 5
- for /l %%i in (1,1,2) do (
- set/a w=%%i+1
- for /l %%j in (!w!,1,3) do (
- if !g%%i! equ !g%%j! (
- set twocouples=1&goto 5
- )
- )
- )
- goto 5
-
-
- :5
- set increase=0
- if !samecolor! equ 1 if !bigline! equ 1 set increase=501&goto 6
- if !bigline! equ 1 set increase=301&goto 6
- if !samecolor! equ 1 if !sameline! equ 1 set increase=101&goto 6
- if !sameline! equ 1 set increase=51&goto 6
- if !samecolor! equ 1 set increase=31&goto 6
- if !samefour! equ 1 set increase=21&goto 6
- if !hulu! equ 1 set increase=16&goto 6
- if !samethree! equ 1 set increase=11&goto 6
- if !twocouples! equ 1 set increase=6&goto 6
-
- :6
- if !increase! equ 501 echo 恭喜你,同花大顺!
- if !increase! equ 301 echo 恭喜你,大顺!
- if !increase! equ 101 echo 恭喜你,同花顺!
- if !increase! equ 51 echo 恭喜你,顺子!
- if !increase! equ 31 echo 恭喜你,同花!
- if !increase! equ 21 echo 恭喜你,四条!
- if !increase! equ 16 echo 恭喜你,葫芦!
- if !increase! equ 11 echo 恭喜你,三条!
- if !increase! equ 6 echo 恭喜你,两对!
- if !increase! equ 0 echo 对不起,什么都不是!
- pause
- set /a mymoney=!mymoney!+(!increase!*!oncemoney!)
- if !mymoney! leq 0 echo 输光了吧!还赌神呢,整个一白痴!&pause>nul&goto end
- if !mymoney! geq 10000 echo 赌神果然名不虚传,您赢了!&pause>nul&goto end
- cls
- goto begin
- :end
- cls
- echo 重玩一次?(是/y,否/n)
- set/p select=
- if !select! equ y goto start
- if !select! equ Y goto start
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::以下是片尾
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- mode con lines=13
- color 0f
- echo.
- echo.
- echo.
- echo.
- echo 谢谢使用……
- ping -n 2 127.0.0.1>nul
- cls
- echo.
- echo.
- echo.
- echo.
- echo 再见!
- ping -n 2 127.0.0.1>nul
- exit
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
复制代码
|