Riichi/build/test_yakus.js
2025-04-12 14:40:37 +02:00

1 line
No EOL
17 KiB
JavaScript

(()=>{"use strict";var t={274:(t,e,i)=>{i.d(e,{F:()=>s});class s{constructor(t,e,i){this.family=t,this.value=e,this.red=i,this.imgFront=new Image,this.imgBack=new Image,this.imgGray=new Image,this.img=new Image,this.imgSrc="",this.tilt=0,this.setImgSrc()}getFamily(){return this.family}getValue(){return this.value}isEqual(t,e){return this.family===t&&this.value===e}isRed(){return this.red}compare(t){return this.family!==t.family?this.family<t.family?-1:1:this.value!==t.value?this.value<t.value?-1:1:0}isLessThan(t){return this.family<t.family||this.family===t.family&&this.value<=t.value}setTilt(){this.tilt=.04*(1-2*Math.random())}drawTile(t,e,i,s,n=!1,o=0,u=!1,r=!0){const l=75*s,a=100*s,m=l/2,h=a/2;t.save(),t.translate(e+m,i+h),t.rotate(o+(r?this.tilt:0));const g=-.92*l/2,p=-.92*a/2;if(t.drawImage(this.imgGray,g,p,l,a),n)t.drawImage(this.imgBack,-m,-h,l,a);else{t.drawImage(this.imgFront,-m,-h,l,a);const e=.9,i=l*e,n=a*e,o=-68*s/2,r=-90*s/2;t.drawImage(this.img,o,r,i,n),u&&t.drawImage(this.imgGray,-m,-h,l,a)}t.restore()}cleanup(){[this.imgFront,this.imgBack,this.imgGray,this.img].forEach((t=>{t.onload=null,t.onerror=null}))}preloadImg(){return t=this,e=void 0,s=function*(){const t=[{img:this.imgFront,src:"img/Regular/Front.svg"},{img:this.imgBack,src:"img/Regular/Back.svg"},{img:this.imgGray,src:"img/Regular/Gray.svg"},{img:this.img,src:this.imgSrc}];yield Promise.all(t.map((({img:t,src:e})=>this.loadImg(t,e))))},new((i=void 0)||(i=Promise))((function(n,o){function u(t){try{l(s.next(t))}catch(t){o(t)}}function r(t){try{l(s.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(u,r)}l((s=s.apply(t,e||[])).next())}));var t,e,i,s}loadImg(t,e){return new Promise(((i,s)=>{t.onload=()=>i(),t.onerror=()=>s(),t.src=e}))}setImgSrc(){if(this.imgSrc="img/Regular/",this.family<=3){const t=["","Man","Pin","Sou"];this.imgSrc+=t[this.family]+String(this.value),this.red&&(this.imgSrc+="-Dora")}else if(4===this.family){const t=["","Ton","Nan","Shaa","Pei"];this.imgSrc+=t[this.value]}else if(5===this.family){const t=["","Chun","Hatsu","Haku"];this.imgSrc+=t[this.value]}this.imgSrc+=".svg"}}},305:(t,e,i)=>{function s(t,e){return t?(console.log("%c[SUCCES] "+e,"color: green"),1):(console.log("%c[ECHEC] "+e,"color: red"),0)}i.d(e,{v:()=>s})},879:(t,e,i)=>{i.d(e,{Y:()=>s});class s{constructor(t,e,i){this.tiles=t,this.stolenFrom=e,this.belongsTo=i}push(t){this.tiles.push(t)}pop(){return this.tiles.pop()}getTiles(){return this.tiles}compare(t){const e=this.tiles[0].compare(t.tiles[0]);return 0!==e?e:this.tiles[1].compare(t.tiles[1])}drawGroup(t,e,i,s,n,o,u){t.save(),t.translate(525,525),t.rotate(o),t.translate(-525,-525);const r=75*n,l=90*n,a=25*n/2,m=(this.belongsTo-this.stolenFrom-1+4)%4,h=void 0===u?-1:u.getFamily(),g=void 0===u?0:u.getValue(),p=(e,i,s,o)=>{e.drawTile(t,i,s,n,!1,o,e.isEqual(h,g))},c=Math.PI/2;switch(m){case 0:p(this.tiles[0],e,i+a,c),p(this.tiles[1],e+l,i,0),p(this.tiles[2],e+l+r+s*n,i,0);break;case 1:p(this.tiles[0],e,i,0),p(this.tiles[1],e+l,i+a,-c),p(this.tiles[2],e+l+r+3*s*n,i,0);break;case 2:p(this.tiles[0],e,i,0),p(this.tiles[1],e+r+s*n,i,0),p(this.tiles[2],e+l+r+s*n,i+a,-c);break;default:console.error(`Position non prise en charge: ${m}`)}t.restore()}}},959:(t,e,i)=>{i.d(e,{U:()=>d});var s=i(274),n=i(879);const o="m",u=1,r="p",l=2,a="s",m=3,h="w",g=4,p="d",c=5;class d{constructor(t=""){this.isolate=!1,this.tiles=[],this.initializeFromString(t)}initializeFromString(t){for(let e=0;e<t.length-1;e++){const i=t.substring(e,e+2),s=i[0],n=Number(i[1]);this.isValidTileCode(s,n)&&this.addTileFromCode(s,n)}}isValidTileCode(t,e){return t===o||t===r||t===a||t===h||t===p}addTileFromCode(t,e){const i={[o]:u,[r]:l,[a]:m,[h]:g,[p]:c}[t];void 0!==i&&this.tiles.push(new s.F(i,e,!1))}getTiles(){return this.tiles}length(){return this.tiles.length}push(t){this.tiles.push(t)}pop(){return this.tiles.pop()}find(t,e){const i=this.findTileIndex(t,e);if(-1!==i){[this.tiles[i],this.tiles[0]]=[this.tiles[0],this.tiles[i]];const t=this.tiles.shift();return this.sort(),t}}findTileIndex(t,e){return this.tiles.findIndex((i=>i.getFamily()===t&&i.getValue()===e))}eject(t){if(t<0||t>=this.tiles.length)throw new Error("Invalid tile index");[this.tiles[0],this.tiles[t]]=[this.tiles[t],this.tiles[0]];const e=this.tiles.shift();return this.sort(),e}get(t){if(!(void 0===t||t<0||t>=this.tiles.length))return this.tiles[t]}sort(){this.tiles.sort(((t,e)=>t.isLessThan(e)?-1:1))}count(t,e){return this.tiles.filter((i=>i.getFamily()===t&&i.getValue()===e)).length}toGroup(t=!1){if(0===this.tiles.length)return[];const e=this.tiles.pop(),i=e.getFamily(),s=e.getValue();if(this.count(i,s)>=1&&!t){const t=this.tryFormPair(e);if(t)return t}if(this.count(i,s)>=2){const i=this.tryFormTriplet(e,t);if(i)return i}const n=this.count(i,s-1)>0,o=this.count(i,s-2)>0;if(n&&o){const i=this.tryFormSequence(e,t);if(i)return i}this.tiles.push(e),this.sort()}tryFormPair(t){const e=this.find(t.getFamily(),t.getValue()),i=this.toGroup(!0);if(this.tiles.push(e),this.sort(),void 0!==i)return this.tiles.push(t),this.sort(),i.push(new n.Y([t,e],0,0)),i}tryFormTriplet(t,e){const i=this.find(t.getFamily(),t.getValue()),s=this.find(t.getFamily(),t.getValue()),o=this.toGroup(e);if(this.tiles.push(i),this.tiles.push(s),this.sort(),void 0!==o)return o.push(new n.Y([t,i,s],0,0)),this.tiles.push(t),this.sort(),o}tryFormSequence(t,e){const i=this.find(t.getFamily(),t.getValue()-1),s=this.find(t.getFamily(),t.getValue()-2),o=this.toGroup(e);if(this.tiles.push(i),this.tiles.push(s),this.sort(),void 0!==o)return o.push(new n.Y([s,i,t],0,0)),this.tiles.push(t),this.sort(),o}drawHand(t,e,i,s,n,o=void 0,u=!1,r=0){const l=(75+s)*n,a=Math.cos(r)*l,m=Math.sin(r)*l;for(let s=0;s<this.tiles.length;s++){const l=s===this.tiles.length-1&&this.isolate?10:0;let h=e+s*a+l*n*Math.cos(r),g=i+s*m+l*n*Math.sin(r);s===o&&(h+=25*n*Math.sin(r),g-=25*n*Math.cos(r)),this.tiles[s].drawTile(t,h,g,n,u,r)}}preload(){return t=this,e=void 0,s=function*(){yield Promise.all(this.tiles.map((t=>t.preloadImg())))},new((i=void 0)||(i=Promise))((function(n,o){function u(t){try{l(s.next(t))}catch(t){o(t)}}function r(t){try{l(s.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(u,r)}l((s=s.apply(t,e||[])).next())}));var t,e,i,s}cleanup(){this.tiles.forEach((t=>t.cleanup())),this.tiles=[]}}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var o=e[s]={exports:{}};return t[s](o,o.exports,i),o.exports}i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s=i(305);function n(t){return t.getTiles().every((t=>t.getFamily()<4&&t.getValue()>1&&t.getValue()<9))}function o(t){return t.getTiles().every((t=>{t.getFamily()<4&&(1===t.getValue()||t.getValue())}))}function u(t){return t.getTiles().every((t=>t.getFamily()>=4))}function r(t){let e=t.getTiles();return e[0].getValue()!==e[1].getValue()}function l(t){let e=t.getTiles();return e[0].getValue()===e[1].getValue()}const a={lipekou:function(t,e,i){if(e.length>0&&!a.ryanpeikou(t,e,i))return 0;let s=t.toGroup();s.sort(((t,e)=>t.compare(e)));for(let t=0;t<3;t++){let e=s[t].getTiles(),i=s[t+1].getTiles();if(e[0].isEqual(i[0].getFamily(),i[0].getValue())&&r(s[t])&&r(s[t+1]))return 1}return 0},ryanpeikou:function(t,e,i){if(e.length>0)return 0;let s=t.toGroup();if(s.filter((t=>r(t))),s.length<4)return 0;s.sort(((t,e)=>t.compare(e)));let n=s[0].getTiles()[0],o=s[1].getTiles()[0],u=s[2].getTiles()[0],l=s[3].getTiles()[0];return 0===n.compare(o)&&0===u.compare(l)?3:0},pinfu:function(t,e,i){if(e.length>0)return 0;let s=t.toGroup();return void 0!==s&&s.every((t=>{let e=t.getTiles();return r(t)||2===e.length}))?1:0},sanshokuDoujun:function(t,e,i){let s=t.toGroup(),n=[];if(n=void 0!==s?e.concat(s):e,n=n.filter((t=>r(t))),n.sort(((t,e)=>t.compare(e))),n.length<3)return 0;if(3===n.length){let t=n[0].getTiles(),i=n[1].getTiles(),s=n[2].getTiles();return t[0].getValue()===i[0].getValue()&&t[0].getValue()===s[0].getValue()&&t[0].getFamily()!==i[0].getFamily()&&t[0].getFamily()!==s[0].getFamily()&&i[0].getFamily()!==s[0].getFamily()?e.length>0?1:2:0}for(let t=0;t<4;t++){let i=[];for(let e=0;e<4;e++)e!==t&&i.push(e);let s=n[i[0]].getTiles(),o=n[i[1]].getTiles(),u=n[i[2]].getTiles();if(s[0].getValue()===o[0].getValue()&&s[0].getValue()===u[0].getValue()&&s[0].getFamily()!==o[0].getFamily()&&s[0].getFamily()!==u[0].getFamily()&&o[0].getFamily()!==u[0].getFamily())return e.length>0?1:2}return 0},ittsuu:function(t,e,i){let s=e.concat(t.toGroup());if(s=s.filter((t=>r(t))),s.sort(((t,e)=>t.compare(e))),s.length<3)return 0;if(3!==s.length){for(let t=0;t<4;t++){let i=[];for(let e=0;e<4;e++)e!==t&&i.push(e);let n=s[i[0]].getTiles(),o=s[i[1]].getTiles(),u=s[i[2]].getTiles();if(1===n[0].getValue()&&4===o[0].getValue()&&7===u[0].getValue()&&n[0].getFamily()===o[0].getFamily()&&n[0].getFamily()===u[0].getFamily())return e.length>0?1:2}return 0}{let t=s[0].getTiles(),i=s[1].getTiles(),n=s[2].getTiles();if(t[0].getFamily()===i[0].getFamily()&&i[0].getFamily()===n[0].getFamily()&&1===t[0].getValue()&&4===i[0].getValue()&&7===n[0].getValue())return e.length>0?1:2}return 0},tanyao:function(t,e,i){let s=t.toGroup();return void 0===s?0:e.every((t=>n(t)))&&s.every((t=>n(t)))?1:0},yakuhai:function(t,e,i){let s=e.concat(t.toGroup());s=s.filter((t=>l(t)&&3===t.getTiles().length));let n=0;return s.forEach((t=>{let e=t.getTiles(),s=e[0].getFamily(),o=e[0].getValue();5===s&&n++,4===s&&0===o&&n++,4===s&&o===i&&n++})),n},shousangen:function(t,e,i){let s=e.concat(t.toGroup());s=s.filter((t=>l(t)));let n=0,o=0;return s.forEach((t=>{let e=t.getTiles();5===e[0].getFamily()&&(3===e.length?n++:o++)})),2==n&&1==o?2:0},daisangen:function(t,e,i){let s=e.concat(t.toGroup());return s=s.filter((t=>l(t)&&3===t.getTiles().length&&5===t.getTiles()[0].getFamily())),3===s.length?13:0},shousuushii:function(t,e,i){let s=e.concat(t.toGroup());s=s.filter((t=>l(t)));let n=0,o=0;return s.forEach((t=>{let e=t.getTiles();4===e[0].getFamily()&&(3===e.length?n++:o++)})),3==n&&1==o?13:0},daisuushi:function(t,e,i){let s=e.concat(t.toGroup());s=s.filter((t=>l(t)));let n=0,o=0;return s.forEach((t=>{let e=t.getTiles();4===e[0].getFamily()&&(3===e.length?n++:o++)})),4==n&&0==o?13:0},chanta:function(t,e,i){let s=e.concat(t.toGroup());return s=s.filter((t=>{let e=t.getTiles(),i=e[0].getFamily(),s=e[0].getValue(),n=e[e.length-1].getValue();return i<4&&1!==s&&9!==n})),s.length>0?0:e.length>0?1:2},junchan:function(t,e,i){let s=e.concat(t.toGroup());return s=s.filter((t=>{let e=t.getTiles(),i=e[0].getFamily(),s=e[0].getValue(),n=e[e.length-1].getValue();return i>3||1!==s&&9!==n})),s.length>0?0:e.length>0?2:3},honroutou:function(t,e,i){let s=e.concat(t.toGroup());return s=s.filter((t=>{let e=t.getTiles(),i=e[0].getFamily(),s=e[1].getValue();return i<4&&1!==s&&9!==s})),s.length>0?0:2},chinroutou:function(t,e,i){let s=t.toGroup();return void 0===s?0:e.every((t=>o(t)))&&s.every((t=>o(t)))?13:0},tsuuiisou:function(t,e,i){let s=t.toGroup();return void 0===s?0:e.every((t=>u(t)))&&s.every((t=>u(t)))?13:0},kokushiMusou:function(t,e,i){if(e.length>0)return 0;let s=t.getTiles();if(s.some((t=>t.getFamily()<4&&t.getValue()>1&&t.getValue()<9)))return 0;let n=0;for(let t=0;t<s.length-1&&(s[t].isEqual(s[t+1].getFamily(),s[t+1].getValue())&&n++,!(n>1));t++);return 1===n?13:0},chiitoitsu:function(t,e,i){if(e.length>0)return 0;let s=t.getTiles();if(14!==s.length)return 0;for(let t=0;t<14;t+=2)if(0!==s[t].compare(s[t+1])||t>0&&0===s[t].compare(s[t-1]))return 0;return 2},toitoi:function(t,e,i){let s=t.toGroup();return e.every((t=>l(t)))&&(null==s?void 0:s.every((t=>l(t))))?2:0},sanankou:function(t,e,i){let s=t.toGroup(),n=0;return null==s||s.forEach((t=>{l(t)&&3===t.getTiles().length&&n++})),3===n?2:0},suuankou:function(t,e,i){let s=t.toGroup(),n=0;return null==s||s.forEach((t=>{l(t)&&3===t.getTiles().length&&n++})),4===n?13:0},sanshokuDoukou:function(t,e,i){return 0},sankantsu:function(t,e,i){return 0},suukantsu:function(t,e,i){return 0},honitsu:function(t,e,i){return 0},chinitsu:function(t,e,i){let s=t.getTiles(),n=s[0];return s.every((t=>t.getFamily()===n.getFamily()))&&e.every((t=>t.getTiles().every((t=>t.getFamily()===n.getFamily()))))?e.length>0?5:6:0},ryuuisou:function(t,e,i){return a.chinitsu(t,e,i),0},chuurenPoutou:function(t,e,i){return e.length>0||a.chinitsu(t,e,i),0}};var m=i(959);let h=0,g=0,p=new m.U("m1m2m3 m4m5m6 m7m8m9 m1m2m3 m5m5"),c=new m.U("m1m1m1 m4m4m4 m7m7m7 p1p1p1 p5p5"),d=new m.U("m1m1m1 p9p9p9 s1s1s1 w2w2w2 d1d1"),w=new m.U("m2m3m4 p3p3p3 p4p5p6 s4s4 s6s7s8"),f=new m.U("m1m2m3 m1m2m3 p7p8p9 p7p8p9 w3w3"),v=new m.U("m1m2m3 m1m2m3 p6p7p8 p7p8p9 w3w3"),y=new m.U("m1m2m3 p1p2p3 s1s2s3 m7m8m9 p9p9"),F=new m.U("m1m2m3 m1m2m3 p6p6 w0w0w0 w3w3w3"),T=new m.U("m1m2m3 m1m2m3 d1d1d1 d2d2d2 d3d3"),k=new m.U("m1m2m3 p6p6 d1d1d1 d2d2d2 d3d3d3"),V=new m.U("m1m2m3 w1w1w1 w2w2w2 w3w3w3 w4w4"),S=new m.U("m1m1 w1w1w1 w2w2w2 w3w3w3 w4w4w4"),G=new m.U("d1d1 w1w1w1 w2w2w2 w3w3w3 w4w4w4"),I=new m.U("m1m1 m9m9m9 p1p1p1 p9p9p9 s1s1s1"),U=new m.U("m1m9m9 p1p9 s1s9 w1w2w3w4 d1d2d3"),C=new m.U("m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 m7m7"),E=new m.U("m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 m6m6"),P=new m.U("m1m2m3 m4m4m4 m7m7m7 p1p1p1 p5p5");new m.U("m1m2m3 m7m7m7 p1p1p1 p5p5"),h+=(0,s.v)(1===a.lipekou(f,[],0),"m123 m123 p789 p789 w33 is Lipeikou"),h+=(0,s.v)(0===a.lipekou(d,[],0),"m111 p999 s111 w222 d11 is not Lipeikou"),g+=2,h+=(0,s.v)(3===a.ryanpeikou(f,[],0),"m123 m123 p789 p789 w33 is Ryanpeikou"),h+=(0,s.v)(0===a.ryanpeikou(v,[],0),"m1123 m123 p678 p789 w33 is not Ryanpeikou"),g+=2,h+=(0,s.v)(1===a.pinfu(p,[],0),"m123 m456 m789 m123 p55 is Pinfu"),h+=(0,s.v)(0===a.pinfu(c,[],0),"m111 m444 m777 p111 p55 is not Pinfu"),g+=2,h+=(0,s.v)(2===a.sanshokuDoujun(y,[],0),"m123 p123 s123 m789 p99 is Shanshokou Doujun"),h+=(0,s.v)(0===a.sanshokuDoujun(c,[],0),"m111 m444 m777 p111 p55 is not Shanshokou Doujun"),g+=2,h+=(0,s.v)(2===a.ittsuu(p,[],0),"m123 m456 m789 m123 m55 is Ittsuu"),h+=(0,s.v)(0===a.ittsuu(c,[],0),"m111 m444 m777 p111 p55 is not Ittsu"),g+=2,h+=(0,s.v)(1===a.tanyao(w,[],0),"m234 p333 p456 s44 s678 is Tanyao"),h+=(0,s.v)(0===a.tanyao(p,[],0),"m123 m456 m789 m123 p55 is not Tanyao"),g+=2,h+=(0,s.v)(1===a.yakuhai(d,[],2),"m111 p999 s111 w222 d11 West is Yakuhai"),h+=(0,s.v)(2===a.yakuhai(F,[],3),"m123 m123 p66 w000 w333 North is double Yakuhai"),h+=(0,s.v)(0===a.yakuhai(d,[],0),"m111 p999 s111 w222 d11 Est is not Yakuhai"),g+=3,h+=(0,s.v)(2===a.shousangen(T,[],0),"m123 m123 d111 d222 d33 is Shousangen"),h+=(0,s.v)(0===a.shousangen(k,[],0),"m123 p66 d111 d222 d333 is not Shousangen"),h+=(0,s.v)(0===a.shousangen(d,[],0),"m111 p999 s111 w222 d11 is not Shousangen"),g+=3,h+=(0,s.v)(13===a.daisangen(k,[],0),"m123 p66 d111 d222 d333 is Daisangen"),h+=(0,s.v)(0===a.daisangen(T,[],0),"m123 m123 d111 d222 d33 is not Daisangen"),h+=(0,s.v)(0===a.daisangen(d,[],0),"m111 p999 s111 w222 d11 is not Daisangen"),g+=3,h+=(0,s.v)(13===a.shousuushii(V,[],0),"m123 w111 w222 w333 w44 is Shousuushi"),h+=(0,s.v)(0===a.shousuushii(S,[],0),"m11 w111 w222 w333 w444 is not Shousuushi"),h+=(0,s.v)(0===a.shousuushii(d,[],0),"m111 p999 s111 w222 d11 is not Shousuushi"),g+=3,h+=(0,s.v)(13===a.daisuushi(S,[],0),"m11 w111 w222 w333 w444 is Daisuushi"),h+=(0,s.v)(0===a.daisuushi(V,[],0),"m123 w111 w222 w333 w44 is not Daisuushi"),h+=(0,s.v)(0===a.daisuushi(d,[],0),"m111 p999 s111 w222 d11 is not Daisuushi"),g+=3,h+=(0,s.v)(2===a.chanta(G,[],0),"d11 w111 w222 w333 w444 is Chanta"),h+=(0,s.v)(2===a.chanta(S,[],0),"m11 w111 w222 w333 w444 is Chanta"),h+=(0,s.v)(0===a.chanta(k,[],0),"m123 p66 d111 d222 d333 is not Chanta"),g+=3,h+=(0,s.v)(3===a.junchan(y,[],0),"m123 p123 s123 m789 p99 is Junchan"),h+=(0,s.v)(0===a.junchan(k,[],0),"m123 p66 d111 d222 d333 is not Junchan"),g+=2,h+=(0,s.v)(2===a.honroutou(I,[],0),"m11 m999 p111 p999 s111 is Honroutou"),h+=(0,s.v)(2===a.honroutou(d,[],0),"m111 p999 s111 w222 d11 is Honroutou"),h+=(0,s.v)(0===a.honroutou(k,[],0),"m123 p66 d111 d222 d333 is not Honroutou"),g+=3,h+=(0,s.v)(13===a.chinroutou(I,[],0),"m11 m999 p111 p999 s111 is Chinroutou"),h+=(0,s.v)(0===a.chinroutou(d,[],0),"m111 p999 s111 w222 d11 is not Chinroutou"),h+=(0,s.v)(0===a.chinroutou(k,[],0),"m123 p66 d111 d222 d333 is not Chinroutou"),g+=3,h+=(0,s.v)(13===a.tsuuiisou(G,[],0),"d11 w111 w222 w333 w444 is Tsuuisou"),h+=(0,s.v)(0===a.tsuuiisou(d,[],0),"m111 p999 s111 w222 d11 is not Tsuuisou"),g+=2,h+=(0,s.v)(13===a.kokushiMusou(U,[],0),"m1m9m9 p1p9 s1s9 w1w2w3w4 d1d2d3 is Kokushi Musou"),h+=(0,s.v)(0===a.kokushiMusou(d,[],0),"m111 p999 s111 w222 d11 is not Kokushi Musou"),g+=2,h+=(0,s.v)(2===a.chiitoitsu(C,[],0),"m11 m22 m33 m44 m55 m66 m77 is Chiitoitsu"),h+=(0,s.v)(0===a.chiitoitsu(E,[],0),"m11 m22 m33 m44 m55 m66 m66 is not Chiitoitsu"),h+=(0,s.v)(0===a.chiitoitsu(d,[],0),"m111 p999 s111 w222 d11 is not Chiitoitsu"),g+=3,h+=(0,s.v)(2===a.toitoi(c,[],0),"m111 m444 m777 p111 p55 is Toitoi"),h+=(0,s.v)(0===a.toitoi(y,[],0),"m123 p123 s123 m789 p99 is not Toitoi"),g+=2,h+=(0,s.v)(2===a.sanankou(P,[],0),"m123 m444 m777 p111 p55 is Sanankou"),h+=(0,s.v)(0===a.sanankou(c,[],0),"m111 m444 m777 p111 p55 is not Sanankou"),h+=(0,s.v)(0===a.sanankou(y,[],0),"m123 p123 s123 m789 p99 is not Sanankou"),g+=3,h+=(0,s.v)(13===a.suuankou(c,[],0),"m111 m444 m777 p111 p55 is Sanankou"),h+=(0,s.v)(0===a.suuankou(P,[],0),"m123 m444 m777 p111 p55 is not Sanankou"),h+=(0,s.v)(0===a.suuankou(y,[],0),"m123 p123 s123 m789 p99 is not Sanankou"),g+=3,console.log("Succès: "+h.toString()+"/"+g.toString())})();