Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
tiansh committed Aug 24, 2011
1 parent 9fcf803 commit 4728d49
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 16 deletions.
27 changes: 27 additions & 0 deletions css/gz.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,31 @@ span.hz3~#hz3 {
color:#FFF;
}

#sdm>div.ppdd {
color:#FFF;
}

#dpsdi {
color:#FFF;
width:80px;
text-align:center;
}

#dpsd {
display: inline-block;
text-align: left;
width: 200px;
}

#dpsd~button.ppdd {
width:20px;
text-align:center;
}

#sdd {
margin-right:40px;
}

#sdp {
margin-left:40px;
}
11 changes: 10 additions & 1 deletion css/help.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,13 @@ footer {

.link {
font-size:12px;
}
}

ul {
list-style-type:none;
}

li {
margin:0 0 0 32px;
text-indent:-32px;
}
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<div id="sdt">规则设定</div>
<div><span id="hpzs">混儿牌张数</span><button id="hz1">3张</button><button id="hz2">7张</button><button id="hz3">11张</button></div>
<div><span id="qihf"></span><button id="qf1">有小和</button><button id="qf2">无小和</button><button id="qf3">无混儿吊</button></div>
<div><span id="dpsd">电脑打牌(秒)</span><button id="sdd" class="ppdd">-</button><input id="dpsdi" type="text" readonly="readonly" /><button id="sdp" class="ppdd">+</button></div>
<div id="sdb"><button id="sdck">重开</button><button id="sdqx">取消</button></div>
</div>
</div>
Expand Down
9 changes: 7 additions & 2 deletions js/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ var
ZH_DNXB=["东","南","西","北"];
// 描述牌面用
var
ZH_SZ=["","一","二","三","四","五","六","七","八","九","十"];
ZH_SZ=["","一","二","三","四","五","六","七","八","九"];
var
ZH_LB=["字","万","饼","条"];
var
ZH_FJ=["","东风","南风","西风","北风","红中","发财","白板"];
ZH_FJ=["","东风","南风","西风","北风","红中","发财","白板"];

// 速度选择(毫秒)
var
SDXZ=[0,100,150,200,250,300,350,400,450,500,600,700,800,900,
1000,1200,1400,1600,1800,2000,2500,3000,4000];
4 changes: 2 additions & 2 deletions js/dn.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/

// 控制电脑打牌速度
var timer_dn, timeout_dn=100;
var timer_dn, timeout_dn=2;

// 电脑打牌——选择
var dap_dn=function () {
setTimeout(function(){timer_dn=true},timeout_dn);
setTimeout(function(){timer_dn=true},SDXZ[timeout_dn]);
timer_dn=false;
var s=sp[zpos];
if (s.pdhp(chty===2).ky) {
Expand Down
17 changes: 15 additions & 2 deletions js/gz.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@ var ginit=function () {
$i("act").className+=" sd";
// 混儿牌张数选择
$i("hpzs").className="hz"+zhang.prototype.numhuir;
// 起和番数选择
$i("qihf").className="qf"+qihuf;
// 打牌速度选择
$i("dpsdi").value=SDXZ[timeout_dn]/1000;
}
// 混儿牌张数的选择
for (i=1;i<=3;i++)
$i("hz"+i).onclick=function () {
$i(["","hz1","hz2","hz3"][i]).onclick=function () {
$i("hpzs").className=this.id;
}
// 起和番数选择按钮
for (i=1;i<=3;i++)
$i("qf"+i).onclick=function () {
$i(["","qf1","qf2","qf3"][i]).onclick=function () {
$i("qihf").className=this.id;
}
// 取消按钮
Expand All @@ -47,4 +50,14 @@ var ginit=function () {
qihuf=($i("qihf").className[2])*1;
callfunc(minit);
}
// 速度选择按钮
$i("sdp").onclick=function () {
if (timeout_dn<SDXZ.length-1) timeout_dn++;
$i("dpsdi").value=SDXZ[timeout_dn]/1000;
}
$i("sdd").onclick=function () {
if (timeout_dn>1) timeout_dn--;
$i("dpsdi").value=SDXZ[timeout_dn]/1000;
}

}
4 changes: 2 additions & 2 deletions js/hp.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
// 和牌时调用的函数
var hup=function () {
var s=sp[zpos], r=s.pdhp(chty===2);
$i("su"+(zpos+1)).className+=" xs";
$i(["su1","su2","su3","su4"][zpos]).className+=" xs";
$i("hupwz").value=ZH_DNXB[(zhuang.dong+3-zpos)%4];
$i("hupms").value=r.mc+"("+r.dx+")";
var hps=$i("hup1"), hps2=$i("hup2"), spn=$i("su"+(zpos+1));
var hps=$i("hup1"), hps2=$i("hup2"), spn=$i(["su1","su2","su3","su4"][zpos]);
hps.innerHTML=spn.innerHTML; hps.className=spn.className;
hps2.innerHTML=spn.innerHTML; hps2.className=spn.className;
hpxs(r,s);
Expand Down
22 changes: 15 additions & 7 deletions rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
<body>
<div id="main">
<h1>天津麻将规则</h1>
<h2>行牌规则要点</h2>
<ul>
<li><a href="#t1">行牌规则要点</a></li>
<li><a href="#t2">和牌番数计算</a><br />
<a href="#t2a">基本番种</a><br />
<a href="#t2b">番种的叠加</a>
</li>
<li><a href="#t3">他人的规则介绍</a></li>
</ul>
<h2 id="t1">行牌规则要点</h2>
<div>天津麻将不使用<mark title="花牌包括春夏秋冬,梅兰竹菊共8张">花牌</mark>,牌张共计136张。</div>
<div>天津麻将行牌中没有<mark title="上家打出的牌,如与自己手中的牌可以组成一副顺子,则可报吃牌。">吃牌</mark>,只有<mark title="碰牌:指任一家打出牌后,报“碰”者把自己的对子取出,加在一起组成一副刻子,并且按规定将此副牌摆亮在立牌前。"></mark><mark title="报开杠的4张相同的牌。分为明杠和暗杠。杠牌后应从开牌的相反方向抓一张牌。"></mark>;没有<mark title="和他人打出的牌。">炮和</mark>(包括<mark title="和他人自抓开明杠的牌">抢杠和</mark>),只能<mark title="自己抓进成和的牌,并报和牌。">自摸和</mark>(包括<mark title="国标称杠上开花,开杠抓进的牌成和牌。">杠开</mark>)。</div>
<div>杠牌<mark mark="他人打出一张与暗刻相同的牌开杠;或抓进一张与明刻相同的牌开杠。">明杠</mark>算一分,<mark title="自抓四张相同的牌开杠">暗杠</mark>两分。</div>
Expand All @@ -19,8 +27,8 @@ <h2>行牌规则要点</h2>
如六万的下一张为七万,九饼的下一张为一饼,北风的下一张为东风,白板的下一张为红中等<br />
混儿在和牌是做百搭用,可以代替任何一张牌(但不能用于碰杠)。<br />
行牌中不能将混儿打出,否则为小相公,不能和牌只能开杠。</div>
<h2>和牌番数计算</h2>
<h3>基本番种</h3>
<h2 id="t2">和牌番数计算</h2>
<h3 id="t2a">基本番种</h3>
<div class="f"><strong>混儿吊</strong>(2)<br />
即最后抓到的牌只和混儿牌组成一副(或一个将)。这样无论上什么牌都可以和。<br />
组成一幅的叫做“双混儿吊”,组成将的叫做“单混儿吊”或简称“混儿吊”。两者统称“混儿吊”<br />
Expand Down Expand Up @@ -54,8 +62,8 @@ <h3>基本番种</h3>
<div class="e">(混儿<div class="b5"></div><div class="b6"></div>
<div class="b5"></div><div class="b5"></div><div class="b6"></div><div class="sp b1"></div><div class="b2"></div><div class="b3"></div><div class="sp b4"></div><div class="sp b7"></div><div class="b8"></div><div class="sp t1"></div><div class="sp t2"></div><div class="t2"></div><div class="t2"></div><div class="sp t1"></div></div><br />
</div>
<h3>番种的叠加</h3>
<div>天津麻将中,同时满足“捉伍儿”“龙”时二者相加;其余情况番种间做乘法计算;同时有加法和乘法时,先加后乘。</div>
<h3 id="t2b">番种的叠加</h3>
<div>天津麻将中,同时满足“捉伍儿”“龙”时二者相加;其余情况番种间做乘法计算;同时有加法和乘法时,先加后乘。(如果有杠单独计算)</div>
<div class="f">
<mark title="混儿吊 捉伍儿"><strong>双混儿伍儿</strong></mark>(6)<br />
如果上除了伍万和混儿以外的其它牌可以和“双混儿吊”的情况下上伍万或混儿,即为双混儿伍儿。<br />
Expand Down Expand Up @@ -124,14 +132,14 @@ <h3>番种的叠加</h3>
<div class="b1"></div><div class="b1"></div><div class="b1"></div><div class="b2"></div><div class="sp b3"></div><div class="sp b4"></div><div class="b5"></div><div class="b6"></div><div class="sp b7"></div><div class="b8"></div><div class="b9"></div><div class="sp z6"></div><div class="z6"></div><div class="sp w5"></div></div>
</div>
<div>除了标记*的外均能再和杠开组合,此处不再赘述。</div>
<h2>其他人的规则介绍</h2>
<div>这里贴两个别人的规则介绍的链接,可能能帮助你的理解。(于09年9月2日查阅)</div>
<h2 id="t3">他人的规则介绍</h2>
<div>
<a class="link" href="http://bbs.nankai.edu.cn/js/telnetview.html?url=/cgi-bin/bbs/jbbscon?board=lostinmemory&file=M.1158552884.A" target="_blank">http://bbs.nankai.edu.cn/js/telnetview.html?url=/cgi-bin/bbs/jbbscon?board=lostinmemory&amp;file=M.1158552884.A</a><br />
标 题: 关于天津麻将~~<br />
发信人: apiezon (阿匹松(跌入命运的深渊……)), 信区: lostinmemory<br />
发信站: 我爱南开站 (2006年09月18日13:46:45 星期一)</div>
<footer>田生 110801</footer>
<p style="font-size:8px;">本页面使用cc by-sa 3.0和GNU 3协议发布。</p>
</div>
</body>
</html>

0 comments on commit 4728d49

Please sign in to comment.