Skip to content

Commit

Permalink
Merge branch 'release/v1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
kobalab committed Feb 17, 2024
2 parents e03b9f6 + 847ff3b commit 0b8708a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v1.2.1 /2024-02-17

- #7 持ち時間切れのタイマーにクリア漏れがあるバグを修正

## v1.2.0 / 2024-02-16

- 持ち時間の表示と時間切れによる強制打牌の処理を追加
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @kobalab/majiang-ui v1.2.0
* @kobalab/majiang-ui v1.2.1
*
* Copyright(C) 2021 Satoshi Kobayashi
* Released under the MIT license
Expand Down
10 changes: 5 additions & 5 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module.exports = class Player extends Majiang.Player {
action_qipai(qipai) { this.callback() }

action_zimo(zimo, gangzimo) {
if (zimo.l != this._menfeng) return this._callback();
if (zimo.l != this._menfeng) return this.callback();

if (this.allow_hule(this.shoupai, null, gangzimo)) {
this.set_button('zimo', ()=>this.callback({hule: '-'}));
Expand Down Expand Up @@ -253,15 +253,15 @@ module.exports = class Player extends Majiang.Player {
}

action_fulou(fulou) {
if (fulou.l != this._menfeng) return this._callback();
if (fulou.m.match(/^[mpsz]\d{4}/)) return this._callback();
if (fulou.l != this._menfeng) return this.callback();
if (fulou.m.match(/^[mpsz]\d{4}/)) return this.callback();

this.show_button(()=>this.select_dapai());
}

action_gang(gang) {
if (gang.l == this._menfeng) return this._callback();
if (gang.m.match(/^[mpsz]\d{4}$/)) return this._callback();
if (gang.l == this._menfeng) return this.callback();
if (gang.m.match(/^[mpsz]\d{4}$/)) return this.callback();

let d = ['','+','=','-'][(4 + this._model.lunban - this._menfeng) % 4];
let p = gang.m[0] + gang.m.substr(-1) + d;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kobalab/majiang-ui",
"version": "1.2.0",
"version": "1.2.1",
"description": "麻雀UIライブラリ",
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit 0b8708a

Please sign in to comment.