今天教大家一个比较简单的:石头剪子布
代码是:@echo off&setlocal enabledelayedexpansion
mode con cols=30 lines=20
set s1=剪刀&set s2=石头&set s3=布
set y=赢!&set n=你&set d=电脑
:start
echo ………………%s1%………………1
echo ………………%s2%………………2
echo ………………%s3%………………3
set /p s=请输入:
set /a c=!random!%%3&set /a c+=1
if !s!==!c! echo 你们是平局!
if !s!==1 if !c!==3 echo !n!!e799bee5baa6e997aee7ad94e78988e69d8331333433623836s%s%!,!d!!s%c%!,!n!!y!
if !s!==2 if !c!==1 echo !n!!s%s%!,!d!!s%c%!,!n!!y!
if !s!==3 if !c!==2 echo !n!!s%s%!,!d!!s%c%!,!n!!y!
if !s!==1 if !c!==2 echo !n!!s%s%!,!d!!s%c%!,!d!!y!
if !s!==2 if !c!==3 echo !n!!s%s%!,!d!!s%c%!,!d!!y!
if !s!==3 if !c!==1 echo !n!!s%s%!,!d!!s%c%!,!d!!y!
pause&cls&goto :start
这是小游戏的最后一期了,赶快试一试。