http://bbs.chinaunix.net/thread-3580033-1-1.html  shell游戏收集贴    

#!/bin/bash   

    # Tetris Game   

    #APP declaration
APP_NAME="${0##*[\\/]}"
APP_VERSION="1.0" #颜色定义
cRed=
cGreen=
cYellow=
cBlue=
cFuchsia=
cCyan=
cWhite=
colorTable=($cRed $cGreen $cYellow $cBlue $cFuchsia $cCyan $cWhite) #位置和大小
iLeft=
iTop=
((iTrayLeft = iLeft + ))
((iTrayTop = iTop + ))
((iTrayWidth = ))
((iTrayHeight = )) #颜色设置
cBorder=$cGreen
cScore=$cFuchsia
cScoreValue=$cCyan #控制信号
#改游戏使用两个进程,一个用于接收输入,一个用于游戏流程和显示界面;
#当前者接收到上下左右等按键时,通过向后者发送signal的方式通知后者。
sigRotate=
sigLeft=
sigRight=
sigDown=
sigAllDown=
sigExit= #七中不同的方块的定义
#通过旋转,每种方块的显示的样式可能有几种
box0=( )
box1=( )
box2=( )
box3=( )
box4=( )
box5=( )
box6=( )
#所有其中方块的定义都放到box变量中
box=(${box0[@]} ${box1[@]} ${box2[@]} ${box3[@]} ${box4[@]} ${box5[@]} ${box6[@]})
#各种方块旋转后可能的样式数目
countBox=( )
#各种方块再box数组中的偏移
offsetBox=( ) #每提高一个速度级需要积累的分数
iScoreEachLevel= #be greater than #运行时数据
sig= #接收到的signal
iScore= #总分
iLevel= #速度级
boxNew=() #新下落的方块的位置定义
cBoxNew= #新下落的方块的颜色
iBoxNewType= #新下落的方块的种类
iBoxNewRotate= #新下落的方块的旋转角度
boxCur=() #当前方块的位置定义
cBoxCur= #当前方块的颜色
iBoxCurType= #当前方块的种类
iBoxCurRotate= #当前方块的旋转角度
boxCurX=- #当前方块的x坐标位置
boxCurY=- #当前方块的y坐标位置
iMap=() #背景方块图表 #初始化所有背景方块为-, 表示没有方块
for ((i = ; i < iTrayHeight * iTrayWidth; i++)); do iMap[$i]=-; done #接收输入的进程的主函数
function RunAsKeyReceiver()
{
local pidDisplayer key aKey sig cESC sTTY pidDisplayer=$
aKey=( ) cESC=`echo -ne "\033"`
cSpace=`echo -ne "\040"` #保存终端属性。在read -s读取终端键时,终端的属性会被暂时改变。
#如果在read -s时程序被不幸杀掉,可能会导致终端混乱,
#需要在程序退出时恢复终端属性。
sTTY=`stty -g` #捕捉退出信号
trap "MyExit;" INT TERM
trap "MyExitNoSub;" $sigExit #隐藏光标
echo -ne "\033[?25l" while :
do
#读取输入。注-s不回显,-n读到一个字符立即返回
read -s -n key aKey[]=${aKey[]}
aKey[]=${aKey[]}
aKey[]=$key
sig= #判断输入了何种键
if [[ $key == $cESC && ${aKey[]} == $cESC ]]
then
#ESC键
MyExit
elif [[ ${aKey[]} == $cESC && ${aKey[]} == "[" ]]
then
if [[ $key == "A" ]]; then sig=$sigRotate #<向上键>
elif [[ $key == "B" ]]; then sig=$sigDown #<向下键>
elif [[ $key == "D" ]]; then sig=$sigLeft #<向左键>
elif [[ $key == "C" ]]; then sig=$sigRight #<向右键>
fi
elif [[ $key == "W" || $key == "w" ]]; then sig=$sigRotate #W, w
elif [[ $key == "S" || $key == "s" ]]; then sig=$sigDown #S, s
elif [[ $key == "A" || $key == "a" ]]; then sig=$sigLeft #A, a
elif [[ $key == "D" || $key == "d" ]]; then sig=$sigRight #D, d
elif [[ "[$key]" == "[]" ]]; then sig=$sigAllDown #空格键
elif [[ $key == "Q" || $key == "q" ]] #Q, q
then
MyExit
fi if [[ $sig != ]]
then
#向另一进程发送消息
kill -$sig $pidDisplayer
fi
done
} #退出前的恢复
function MyExitNoSub()
{
local y #恢复终端属性
stty $sTTY
((y = iTop + iTrayHeight + )) #显示光标
echo -e "\033[?25h\033[${y};0H"
exit
} function MyExit()
{
#通知显示进程需要退出
kill -$sigExit $pidDisplayer MyExitNoSub
} #处理显示和游戏流程的主函数
function RunAsDisplayer()
{
local sigThis
InitDraw #挂载各种信号的处理函数
trap "sig=$sigRotate;" $sigRotate
trap "sig=$sigLeft;" $sigLeft
trap "sig=$sigRight;" $sigRight
trap "sig=$sigDown;" $sigDown
trap "sig=$sigAllDown;" $sigAllDown
trap "ShowExit;" $sigExit while :
do
#根据当前的速度级iLevel不同,设定相应的循环的次数
for ((i = ; i < - iLevel; i++))
do
sleep 0.02
sigThis=$sig
sig= #根据sig变量判断是否接受到相应的信号
if ((sigThis == sigRotate)); then BoxRotate; #旋转
elif ((sigThis == sigLeft)); then BoxLeft; #左移一列
elif ((sigThis == sigRight)); then BoxRight; #右移一列
elif ((sigThis == sigDown)); then BoxDown; #下落一行
elif ((sigThis == sigAllDown)); then BoxAllDown; #下落到底
fi
done
#kill -$sigDown $$
BoxDown #下落一行
done
} #BoxMove(y, x), 测试是否可以把移动中的方块移到(x, y)的位置, 返回0则可以, 1不可以
function BoxMove()
{
local j i x y xTest yTest
yTest=$
xTest=$
for ((j = ; j < ; j += ))
do
((i = j + ))
((y = ${boxCur[$j]} + yTest))
((x = ${boxCur[$i]} + xTest))
if (( y < || y >= iTrayHeight || x < || x >= iTrayWidth))
then
#撞到墙壁了
return
fi
if ((${iMap[y * iTrayWidth + x]} != - ))
then
#撞到其他已经存在的方块了
return
fi
done
return ;
} #将当前移动中的方块放到背景方块中去,
#并计算新的分数和速度级。(即一次方块落到底部)
function Box2Map()
{
local j i x y xp yp line #将当前移动中的方块放到背景方块中去
for ((j = ; j < ; j += ))
do
((i = j + ))
((y = ${boxCur[$j]} + boxCurY))
((x = ${boxCur[$i]} + boxCurX))
((i = y * iTrayWidth + x))
iMap[$i]=$cBoxCur
done #消去可被消去的行
line=
for ((j = ; j < iTrayWidth * iTrayHeight; j += iTrayWidth))
do
for ((i = j + iTrayWidth - ; i >= j; i--))
do
if ((${iMap[$i]} == -)); then break; fi
done
if ((i >= j)); then continue; fi ((line++))
for ((i = j - ; i >= ; i--))
do
((x = i + iTrayWidth))
iMap[$x]=${iMap[$i]}
done
for ((i = ; i < iTrayWidth; i++))
do
iMap[$i]=-
done
done if ((line == )); then return; fi #根据消去的行数line计算分数和速度级
((x = iLeft + iTrayWidth * + ))
((y = iTop + ))
((iScore += line * - ))
#显示新的分数
echo -ne "\033[1m\033[3${cScoreValue}m\033[${y};${x}H${iScore} "
if ((iScore % iScoreEachLevel < line * - ))
then
if ((iLevel < ))
then
((iLevel++))
((y = iTop + ))
#显示新的速度级
echo -ne "\033[3${cScoreValue}m\033[${y};${x}H${iLevel} "
fi
fi
echo -ne "\033[0m" #重新显示背景方块
for ((y = ; y < iTrayHeight; y++))
do
((yp = y + iTrayTop + ))
((xp = iTrayLeft + ))
((i = y * iTrayWidth))
echo -ne "\033[${yp};${xp}H"
for ((x = ; x < iTrayWidth; x++))
do
((j = i + x))
if ((${iMap[$j]} == -))
then
echo -ne " "
else
echo -ne "\033[1m\033[7m\033[3${iMap[$j]}m\033[4${iMap[$j]}m[]\033[0m"
fi
done
done
} #下落一行
function BoxDown()
{
local y s
((y = boxCurY + )) #新的y坐标
if BoxMove $y $boxCurX #测试是否可以下落一行
then
s="`DrawCurBox 0`" #将旧的方块抹去
((boxCurY = y))
s="$s`DrawCurBox 1`" #显示新的下落后方块
echo -ne $s
else
#走到这儿, 如果不能下落了
Box2Map #将当前移动中的方块贴到背景方块中
RandomBox #产生新的方块
fi
} #左移一列
function BoxLeft()
{
local x s
((x = boxCurX - ))
if BoxMove $boxCurY $x
then
s=`DrawCurBox `
((boxCurX = x))
s=$s`DrawCurBox `
echo -ne $s
fi
} #右移一列
function BoxRight()
{
local x s
((x = boxCurX + ))
if BoxMove $boxCurY $x
then
s=`DrawCurBox `
((boxCurX = x))
s=$s`DrawCurBox `
echo -ne $s
fi
} #下落到底
function BoxAllDown()
{
local k j i x y iDown s
iDown=$iTrayHeight #计算一共需要下落多少行
for ((j = ; j < ; j += ))
do
((i = j + ))
((y = ${boxCur[$j]} + boxCurY))
((x = ${boxCur[$i]} + boxCurX))
for ((k = y + ; k < iTrayHeight; k++))
do
((i = k * iTrayWidth + x))
if (( ${iMap[$i]} != -)); then break; fi
done
((k -= y + ))
if (( $iDown > $k )); then iDown=$k; fi
done s=`DrawCurBox ` #将旧的方块抹去
((boxCurY += iDown))
s=$s`DrawCurBox ` #显示新的下落后的方块
echo -ne $s
Box2Map #将当前移动中的方块贴到背景方块中
RandomBox #产生新的方块
} #旋转方块
function BoxRotate()
{
local iCount iTestRotate boxTest j i s
iCount=${countBox[$iBoxCurType]} #当前的方块经旋转可以产生的样式的数目 #计算旋转后的新的样式
((iTestRotate = iBoxCurRotate + ))
if ((iTestRotate >= iCount))
then
((iTestRotate = ))
fi #更新到新的样式, 保存老的样式(但不显示)
for ((j = , i = (${offsetBox[$iBoxCurType]} + $iTestRotate) * ; j < ; j++, i++))
do
boxTest[$j]=${boxCur[$j]}
boxCur[$j]=${box[$i]}
done if BoxMove $boxCurY $boxCurX #测试旋转后是否有空间放的下
then
#抹去旧的方块
for ((j = ; j < ; j++))
do
boxCur[$j]=${boxTest[$j]}
done
s=`DrawCurBox ` #画上新的方块
for ((j = , i = (${offsetBox[$iBoxCurType]} + $iTestRotate) * ; j < ; j++, i++))
do
boxCur[$j]=${box[$i]}
done
s=$s`DrawCurBox `
echo -ne $s
iBoxCurRotate=$iTestRotate
else
#不能旋转,还是继续使用老的样式
for ((j = ; j < ; j++))
do
boxCur[$j]=${boxTest[$j]}
done
fi
} #DrawCurBox(bDraw), 绘制当前移动中的方块, bDraw为1, 画上, bDraw为0, 抹去方块。
function DrawCurBox()
{
local i j t bDraw sBox s
bDraw=$ s=""
if (( bDraw == ))
then
sBox="\040\040"
else
sBox="[]"
s=$s"\033[1m\033[7m\033[3${cBoxCur}m\033[4${cBoxCur}m"
fi for ((j = ; j < ; j += ))
do
((i = iTrayTop + + ${boxCur[$j]} + boxCurY))
((t = iTrayLeft + + * (boxCurX + ${boxCur[$j + ]})))
#\[y;xH, 光标到(x, y)处
s=$s"\033[${i};${t}H${sBox}"
done
s=$s"\033[0m"
echo -n $s
} #更新新的方块
function RandomBox()
{
local i j t #更新当前移动的方块
iBoxCurType=${iBoxNewType}
iBoxCurRotate=${iBoxNewRotate}
cBoxCur=${cBoxNew}
for ((j = ; j < ${#boxNew[@]}; j++))
do
boxCur[$j]=${boxNew[$j]}
done #显示当前移动的方块
if (( ${#boxCur[@]} == ))
then
#计算当前方块该从顶端哪一行"冒"出来
for ((j = , t = ; j < ; j += ))
do
if ((${boxCur[$j]} < t)); then t=${boxCur[$j]}; fi
done
((boxCurY = -t))
for ((j = , i = -, t = ; j < ; j += ))
do
if ((${boxCur[$j]} > i)); then i=${boxCur[$j]}; fi
if ((${boxCur[$j]} < t)); then t=${boxCur[$j]}; fi
done
((boxCurX = (iTrayWidth - - i - t) / )) #显示当前移动的方块
echo -ne `DrawCurBox ` #如果方块一出来就没处放,Game over!
if ! BoxMove $boxCurY $boxCurX
then
kill -$sigExit ${PPID}
ShowExit
fi
fi #清除右边预显示的方块
for ((j = ; j < ; j++))
do
((i = iTop + + j))
((t = iLeft + * iTrayWidth + ))
echo -ne "\033[${i};${t}H "
done #随机产生新的方块
((iBoxNewType = RANDOM % ${#offsetBox[@]}))
((iBoxNewRotate = RANDOM % ${countBox[$iBoxNewType]}))
for ((j = , i = (${offsetBox[$iBoxNewType]} + $iBoxNewRotate) * ; j < ; j++, i++))
do
boxNew[$j]=${box[$i]};
done ((cBoxNew = ${colorTable[RANDOM % ${#colorTable[@]}]})) #显示右边预显示的方块
echo -ne "\033[1m\033[7m\033[3${cBoxNew}m\033[4${cBoxNew}m"
for ((j = ; j < ; j += ))
do
((i = iTop + + ${boxNew[$j]}))
((t = iLeft + * iTrayWidth + + * ${boxNew[$j + ]}))
echo -ne "\033[${i};${t}H[]"
done
echo -ne "\033[0m"
} #初始绘制
function InitDraw()
{
clear
RandomBox #随机产生方块,这时右边预显示窗口中有方快了
RandomBox #再随机产生方块,右边预显示窗口中的方块被更新,原先的方块将开始下落
local i t1 t2 t3 #显示边框
echo -ne "\033[1m"
echo -ne "\033[3${cBorder}m\033[4${cBorder}m" ((t2 = iLeft + ))
((t3 = iLeft + iTrayWidth * + ))
for ((i = ; i < iTrayHeight; i++))
do
((t1 = i + iTop + ))
echo -ne "\033[${t1};${t2}H||"
echo -ne "\033[${t1};${t3}H||"
done ((t2 = iTop + iTrayHeight + ))
for ((i = ; i < iTrayWidth + ; i++))
do
((t1 = i * + iLeft + ))
echo -ne "\033[${iTrayTop};${t1}H=="
echo -ne "\033[${t2};${t1}H=="
done
echo -ne "\033[0m" #显示"Score"和"Level"字样
echo -ne "\033[1m"
((t1 = iLeft + iTrayWidth * + ))
((t2 = iTop + ))
echo -ne "\033[3${cScore}m\033[${t2};${t1}HScore"
((t2 = iTop + ))
echo -ne "\033[3${cScoreValue}m\033[${t2};${t1}H${iScore}"
((t2 = iTop + ))
echo -ne "\033[3${cScore}m\033[${t2};${t1}HLevel"
((t2 = iTop + ))
echo -ne "\033[3${cScoreValue}m\033[${t2};${t1}H${iLevel}"
echo -ne "\033[0m"
} #退出时显示GameOVer!
function ShowExit()
{
local y
((y = iTrayHeight + iTrayTop + ))
echo -e "\033[${y};0HGameOver!\033[0m"
exit
} #显示用法.
function Usage()
{
cat << EOF
Usage: $APP_NAME
Start tetris game. -h, --help display this help and exit
--version output version information and exit
EOF
} #游戏主程序在这儿开始.
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
Usage
elif [[ "$1" == "--version" ]]; then
echo "$APP_NAME $APP_VERSION"
elif [[ "$1" == "--show" ]]; then
#当发现具有参数--show时,运行显示函数
RunAsDisplayer
else
bash $ --show& #以参数--show将本程序再运行一遍
RunAsKeyReceiver $! #以上一行产生的进程的进程号作为参数
fi

游戏似乎有些问题,注释掉以下代码便可运行。否则报错

#显示用法.
function Usage
{
cat << EOF
Usage: $APP_NAME
Start tetris game. -h, --help display this help and exit
--version output version information and exit
EOF
}
[root@-shiyan sed]# chmod u+x game
[root@-shiyan sed]# ./game -h
./game: line : warning: here-document at line delimited by end-of-file (wanted `EOF')
./game: line : syntax error: unexpected end of file
最后发现,这是因为结尾的EOF前后不能有空白,仅此而已。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUoAAAGECA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/Pk/0Tv2eNcmA9frPf09pc5HvQ2zVf1ns4PH9O2tFz9qf8Jp8U96oGo3q9+lB00PrUhGcRm3xKp40xGAX+i91PsSdc9O0++XO+l41x4hz/+9I3MXcOl3jtc5m++U9DbNNm7u+ohi5ZL+rYpSdKpjeOPManfclua153+YHN68OPyovdqyfEM78/6n5EbOrSVQf5waguf0g3z5C8r2y87zrU/Ja/0uluYPH7P6t0/H6F37ezyW2V//3n1/hj5AZllvVd//WoAvU2zw9dajJN+sHTsD8zXPnr8KugNUC3oDVAt6A0AAACwOf8PQVKfK/z60KoAAAAASUVORK5CYII=" alt="" />

shell脚本实例-游戏脚本的更多相关文章

  1. Shell实现多级菜单系统安装维护脚本实例分享

    Shell实现多级菜单系统安装维护脚本实例分享 这篇文章主要介绍了Shell实现多级菜单系统安装维护脚本实例分享,本文脚本用多级菜单实现管理WEB服务器.Mysql服务器.Nginx服器等,需要的朋友 ...

  2. 分享7个shell脚本实例--shell脚本练习必备

    概述 看多shell脚本实例自然就会有shell脚本的编写思路了,所以我一般比较推荐看脚本实例来练习shell脚本.下面分享几个shell脚本实例. 1.监测Nginx访问日志502情况,并做相应动作 ...

  3. Shell文件权限和脚本执行

    一.预备知识 1.shell的作用   2.常识 (1)Tab键自动补全   使用Terminal时,输入命令的前几个字母,敲tab会自动补全命令或文件名.目录等. 好处:操作速度更快:不容易出错: ...

  4. (转)shell实现多级菜单脚本编写

    shell实现多级菜单脚本编写 原文:https://www.yuanmas.com/info/2gOwBPvqyb.html 这篇文章主要介绍了Shell实现多级菜单系统安装脚本实例分享,本文脚本用 ...

  5. Linux(centos 6.5) 调用java脚本以及定时运行的脚本实例及配置文件具体解释

    Linux(centos 6.5) 调用java脚本以及定时运行的脚本实例 一.调用java程序脚本(默认已经搭建好了Java环境) 1.jdk 安装路径 /usr/jdk/jdk1.7/-- 2.j ...

  6. 从游戏脚本语言说起,剖析Mono所搭建的脚本基础

    0x00 前言 在日常的工作中,我偶尔能遇到这样的问题:“为何游戏脚本在现在的游戏开发中变得不可或缺?”.那么这周我就写篇文章从游戏脚本聊起,分析一下游戏脚本因何出现,而mono又能提供怎样的脚本基础 ...

  7. LoadRunner脚本实例来验证参数化的取值

    LoadRunner脚本实例来验证参数化的取值 SINM {3]!G0问题提出:  主要想试验下,在Controller中,多个用户,多次迭代中参数的取值.51Testing软件测试网(['H5f,d ...

  8. LoadRunner关联函数的脚本实例--如何操作关联参数

    LoadRunner关联函数的脚本实例--如何操作关联参数 这几天一直在学习LoadRunner的VuGen编程,今天想对关联函数web_reg_save_param做详细的试验和研究: ~f6p q ...

  9. centos shell编程6一些工作中实践脚本 nagios监控脚本 自定义zabbix脚本 mysql备份脚本 zabbix错误日志 直接送给bc做计算 gzip innobackupex/Xtrabackup 第四十节课

    centos   shell编程6一些工作中实践脚本   nagios监控脚本 自定义zabbix脚本 mysql备份脚本 zabbix错误日志  直接送给bc做计算  gzip  innobacku ...

随机推荐

  1. Motorola C118修改滤波器组件

    所需工具: 热风枪.恒温焊台.镊子.助焊膏.锡丝.滤波器组件 关于怎么使用热风枪拆屏蔽盖将在后期更新视频,以下为修改滤波器流程.以下热风枪设置温度只针对快克957DW(不同品牌风枪和型号可能会有温差) ...

  2. NSIS安装制作基础教程[初级篇], 献给对NSIS有兴趣的初学者

    NSIS安装制作基础教程[初级篇], 献给对NSIS有兴趣的初学者 作者: raindy 来源:http://bbs.hanzify.org/index.php?showtopic=30029 时间: ...

  3. iOS开发环境C语言基础 运算符和表达式

    1 年龄判断程序 1.1 问题 本案例需要使用交互的方式判断年龄的范围:用户从控制台输入一个年龄,由程序判断该年龄是否在18~50岁之间.程序交互过程如图-1所示: 图-1 1.2 步骤 实现此案例需 ...

  4. 解决两台虚拟机互ping可通,但connect失败

    问题描述: 在UNP一书中实例中,采用两台不同的虚拟机.即一台虚拟机作为服务端,另外一台虚拟机作为客户端. 现象: 两台电脑各自互ping可通 客户端访问local可行 客户机访问服务端报错:No r ...

  5. C++调试技巧

    编号:1010时间:2016年5月13日11:15:20功能:C++调试技巧http://www.cnblogs.com/lidabo/p/3631055.html

  6. hdu 5190 Building Blocks

    问题描述 看完电影后,乐乐回家玩起了积木. 他已经搭好了n堆积木,他想通过调整积木,使得其中有连续W堆积木具有相同的高度,同时他希望高度恰好为H. 乐乐的积木都这了,也就是说不能添加新的积木,只能移动 ...

  7. 使用AjaxPro

    1:后台注册 protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(ty ...

  8. cdoj 482 优先队列+bfs

    Charitable Exchange Time Limit: 4000/2000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Othe ...

  9. Mac中Fn键技巧

    此文适用:Mac自带苹果键盘或外接有Fn键的普通键盘 上一页=Fn+⬅️ 下一页=Fn+➡️ 向上卷动=Fn+⬆️ 向下卷动=Fn+⬇️

  10. Jdbc 连接MySQL数据库的方法和问题

    用eclipse写代码.编译之前,先右键点击项目,选择Build Path->library->add external library, 到MySQL网站下载MySQL的Jdbc驱动,把 ...