diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/assets/cat-pad-bed89044.png b/assets/cat-pad-bed89044.png new file mode 100644 index 0000000..813890f Binary files /dev/null and b/assets/cat-pad-bed89044.png differ diff --git a/assets/dog-pad-b402bc20.png b/assets/dog-pad-b402bc20.png new file mode 100644 index 0000000..bca88f3 Binary files /dev/null and b/assets/dog-pad-b402bc20.png differ diff --git a/assets/duck-pad-ce2d1de9.png b/assets/duck-pad-ce2d1de9.png new file mode 100644 index 0000000..f50a7b8 Binary files /dev/null and b/assets/duck-pad-ce2d1de9.png differ diff --git a/assets/index-3b2d6a43.css b/assets/index-3b2d6a43.css new file mode 100644 index 0000000..9f16a93 --- /dev/null +++ b/assets/index-3b2d6a43.css @@ -0,0 +1 @@ +html,body,#root{margin:0;height:100%;overflow:hidden;-webkit-user-select:none;user-select:none}#root{position:relative;background-color:#fff}#root canvas{position:absolute;top:0;left:0}#modal{position:fixed;top:50%;left:50%;display:flex;flex-direction:column;gap:1rem;overflow:hidden;min-width:60%;min-height:20%;height:30vh;max-height:60%;z-index:100;background-color:#fff;border-radius:.5rem;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;-ms-border-radius:.5rem;-o-border-radius:.5rem;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%)}#modal .modal-head{display:flex;gap:1rem;justify-content:space-between;align-items:center;font-size:1.2rem;font-weight:700;text-transform:capitalize;padding:.8rem;position:relative}#modal .modal-head:after{position:absolute;bottom:1px;left:0;right:0;width:inherit;height:.1px;background-color:#56565656;display:block;content:""}#modal .modal-body{font-weight:200;padding:1rem}button#modal-close{cursor:pointer;padding:.5rem .7rem;border:none;text-transform:uppercase;color:#fff;background-color:#9f3c48;font-size:1.25rem;font-weight:700;border-radius:.5rem;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;-ms-border-radius:.5rem;-o-border-radius:.5rem}button[id*=Game]{cursor:pointer;padding:.5rem .7rem;border:none;text-transform:uppercase;color:#fff;background-color:#3c4e9f;font-size:1rem;font-weight:700;border-radius:.5rem;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;-ms-border-radius:.5rem;-o-border-radius:.5rem;max-height:3.5rem}#btnWrap{position:fixed;bottom:0;right:15px;padding:1rem;display:flex;gap:1rem}button#restartGame{background-color:#3c9f74}button#refreshGame{background-color:#2d6398}button#hintingGame{background-color:#cf964a}button[disabled]{opacity:.5;filter:grayscale(.8);-webkit-filter:grayscale(.8)} diff --git a/assets/index-9d2fcea1.js b/assets/index-9d2fcea1.js new file mode 100644 index 0000000..b8f8fd0 --- /dev/null +++ b/assets/index-9d2fcea1.js @@ -0,0 +1,42 @@ +var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __publicField=(obj,key,value)=>(__defNormalProp(obj,typeof key!="symbol"?key+"":key,value),value);(function(){const relList=document.createElement("link").relList;if(relList&&relList.supports&&relList.supports("modulepreload"))return;for(const link of document.querySelectorAll('link[rel="modulepreload"]'))processPreload(link);new MutationObserver(mutations=>{for(const mutation of mutations)if(mutation.type==="childList")for(const node of mutation.addedNodes)node.tagName==="LINK"&&node.rel==="modulepreload"&&processPreload(node)}).observe(document,{childList:!0,subtree:!0});function getFetchOpts(link){const fetchOpts={};return link.integrity&&(fetchOpts.integrity=link.integrity),link.referrerPolicy&&(fetchOpts.referrerPolicy=link.referrerPolicy),link.crossOrigin==="use-credentials"?fetchOpts.credentials="include":link.crossOrigin==="anonymous"?fetchOpts.credentials="omit":fetchOpts.credentials="same-origin",fetchOpts}function processPreload(link){if(link.ep)return;link.ep=!0;const fetchOpts=getFetchOpts(link);fetch(link.href,fetchOpts)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! ***************************************************************************** +Copyright (C) Microsoft. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */var Reflect2;(function(Reflect3){(function(factory){var root=typeof commonjsGlobal=="object"?commonjsGlobal:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),exporter=makeExporter(Reflect3);typeof root.Reflect>"u"?root.Reflect=Reflect3:exporter=makeExporter(root.Reflect,exporter),factory(exporter);function makeExporter(target,previous){return function(key,value){typeof target[key]!="function"&&Object.defineProperty(target,key,{configurable:!0,writable:!0,value}),previous&&previous(key,value)}}})(function(exporter){var hasOwn=Object.prototype.hasOwnProperty,supportsSymbol=typeof Symbol=="function",toPrimitiveSymbol=supportsSymbol&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",iteratorSymbol=supportsSymbol&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",supportsCreate=typeof Object.create=="function",supportsProto={__proto__:[]}instanceof Array,downLevel=!supportsCreate&&!supportsProto,HashMap={create:supportsCreate?function(){return MakeDictionary(Object.create(null))}:supportsProto?function(){return MakeDictionary({__proto__:null})}:function(){return MakeDictionary({})},has:downLevel?function(map,key){return hasOwn.call(map,key)}:function(map,key){return key in map},get:downLevel?function(map,key){return hasOwn.call(map,key)?map[key]:void 0}:function(map,key){return map[key]}},functionPrototype=Object.getPrototypeOf(Function),usePolyfill=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",_Map=!usePolyfill&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:CreateMapPolyfill(),_Set=!usePolyfill&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:CreateSetPolyfill(),_WeakMap=!usePolyfill&&typeof WeakMap=="function"?WeakMap:CreateWeakMapPolyfill(),Metadata=new _WeakMap;function decorate(decorators,target,propertyKey,attributes){if(IsUndefined(propertyKey)){if(!IsArray(decorators))throw new TypeError;if(!IsConstructor(target))throw new TypeError;return DecorateConstructor(decorators,target)}else{if(!IsArray(decorators))throw new TypeError;if(!IsObject(target))throw new TypeError;if(!IsObject(attributes)&&!IsUndefined(attributes)&&!IsNull(attributes))throw new TypeError;return IsNull(attributes)&&(attributes=void 0),propertyKey=ToPropertyKey(propertyKey),DecorateProperty(decorators,target,propertyKey,attributes)}}exporter("decorate",decorate);function metadata(metadataKey,metadataValue){function decorator(target,propertyKey){if(!IsObject(target))throw new TypeError;if(!IsUndefined(propertyKey)&&!IsPropertyKey(propertyKey))throw new TypeError;OrdinaryDefineOwnMetadata(metadataKey,metadataValue,target,propertyKey)}return decorator}exporter("metadata",metadata);function defineMetadata(metadataKey,metadataValue,target,propertyKey){if(!IsObject(target))throw new TypeError;return IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey)),OrdinaryDefineOwnMetadata(metadataKey,metadataValue,target,propertyKey)}exporter("defineMetadata",defineMetadata);function hasMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;return IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey)),OrdinaryHasMetadata(metadataKey,target,propertyKey)}exporter("hasMetadata",hasMetadata);function hasOwnMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;return IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey)),OrdinaryHasOwnMetadata(metadataKey,target,propertyKey)}exporter("hasOwnMetadata",hasOwnMetadata);function getMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;return IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey)),OrdinaryGetMetadata(metadataKey,target,propertyKey)}exporter("getMetadata",getMetadata);function getOwnMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;return IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey)),OrdinaryGetOwnMetadata(metadataKey,target,propertyKey)}exporter("getOwnMetadata",getOwnMetadata);function getMetadataKeys(target,propertyKey){if(!IsObject(target))throw new TypeError;return IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey)),OrdinaryMetadataKeys(target,propertyKey)}exporter("getMetadataKeys",getMetadataKeys);function getOwnMetadataKeys(target,propertyKey){if(!IsObject(target))throw new TypeError;return IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey)),OrdinaryOwnMetadataKeys(target,propertyKey)}exporter("getOwnMetadataKeys",getOwnMetadataKeys);function deleteMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));var metadataMap=GetOrCreateMetadataMap(target,propertyKey,!1);if(IsUndefined(metadataMap)||!metadataMap.delete(metadataKey))return!1;if(metadataMap.size>0)return!0;var targetMetadata=Metadata.get(target);return targetMetadata.delete(propertyKey),targetMetadata.size>0||Metadata.delete(target),!0}exporter("deleteMetadata",deleteMetadata);function DecorateConstructor(decorators,target){for(var i=decorators.length-1;i>=0;--i){var decorator=decorators[i],decorated=decorator(target);if(!IsUndefined(decorated)&&!IsNull(decorated)){if(!IsConstructor(decorated))throw new TypeError;target=decorated}}return target}function DecorateProperty(decorators,target,propertyKey,descriptor){for(var i=decorators.length-1;i>=0;--i){var decorator=decorators[i],decorated=decorator(target,propertyKey,descriptor);if(!IsUndefined(decorated)&&!IsNull(decorated)){if(!IsObject(decorated))throw new TypeError;descriptor=decorated}}return descriptor}function GetOrCreateMetadataMap(O,P,Create){var targetMetadata=Metadata.get(O);if(IsUndefined(targetMetadata)){if(!Create)return;targetMetadata=new _Map,Metadata.set(O,targetMetadata)}var metadataMap=targetMetadata.get(P);if(IsUndefined(metadataMap)){if(!Create)return;metadataMap=new _Map,targetMetadata.set(P,metadataMap)}return metadataMap}function OrdinaryHasMetadata(MetadataKey,O,P){var hasOwn2=OrdinaryHasOwnMetadata(MetadataKey,O,P);if(hasOwn2)return!0;var parent=OrdinaryGetPrototypeOf(O);return IsNull(parent)?!1:OrdinaryHasMetadata(MetadataKey,parent,P)}function OrdinaryHasOwnMetadata(MetadataKey,O,P){var metadataMap=GetOrCreateMetadataMap(O,P,!1);return IsUndefined(metadataMap)?!1:ToBoolean(metadataMap.has(MetadataKey))}function OrdinaryGetMetadata(MetadataKey,O,P){var hasOwn2=OrdinaryHasOwnMetadata(MetadataKey,O,P);if(hasOwn2)return OrdinaryGetOwnMetadata(MetadataKey,O,P);var parent=OrdinaryGetPrototypeOf(O);if(!IsNull(parent))return OrdinaryGetMetadata(MetadataKey,parent,P)}function OrdinaryGetOwnMetadata(MetadataKey,O,P){var metadataMap=GetOrCreateMetadataMap(O,P,!1);if(!IsUndefined(metadataMap))return metadataMap.get(MetadataKey)}function OrdinaryDefineOwnMetadata(MetadataKey,MetadataValue,O,P){var metadataMap=GetOrCreateMetadataMap(O,P,!0);metadataMap.set(MetadataKey,MetadataValue)}function OrdinaryMetadataKeys(O,P){var ownKeys=OrdinaryOwnMetadataKeys(O,P),parent=OrdinaryGetPrototypeOf(O);if(parent===null)return ownKeys;var parentKeys=OrdinaryMetadataKeys(parent,P);if(parentKeys.length<=0)return ownKeys;if(ownKeys.length<=0)return parentKeys;for(var set=new _Set,keys=[],_i=0,ownKeys_1=ownKeys;_i=0&&index=this._keys.length?(this._index=-1,this._keys=arraySentinel,this._values=arraySentinel):this._index++,{value:result,done:!1}}return{value:void 0,done:!0}},MapIterator2.prototype.throw=function(error){throw this._index>=0&&(this._index=-1,this._keys=arraySentinel,this._values=arraySentinel),error},MapIterator2.prototype.return=function(value){return this._index>=0&&(this._index=-1,this._keys=arraySentinel,this._values=arraySentinel),{value,done:!0}},MapIterator2}();return function(){function Map2(){this._keys=[],this._values=[],this._cacheKey=cacheSentinel,this._cacheIndex=-2}return Object.defineProperty(Map2.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Map2.prototype.has=function(key){return this._find(key,!1)>=0},Map2.prototype.get=function(key){var index=this._find(key,!1);return index>=0?this._values[index]:void 0},Map2.prototype.set=function(key,value){var index=this._find(key,!0);return this._values[index]=value,this},Map2.prototype.delete=function(key){var index=this._find(key,!1);if(index>=0){for(var size=this._keys.length,i=index+1;i{const canvas=document.createElement("canvas"),ctx=canvas.getContext("2d",{desynchronized:!1,alpha:!0,willReadFrequently:!1});return id&&(canvas.id=id),[canvas,ctx]},catImg=document.createElement("img");catImg.src=cat;const dogImg=document.createElement("img");dogImg.src=dog;const lionImg=document.createElement("img");lionImg.src=lion;const duckImg=document.createElement("img");duckImg.src=duck;const mouseImg=document.createElement("img");mouseImg.src=mouse;const rabbitImg=document.createElement("img");rabbitImg.src=rabbit;const pandaImg=document.createElement("img");pandaImg.src=panda;const pigImg=document.createElement("img");pigImg.src=pig;const racoonImg=document.createElement("img");racoonImg.src=racoon;const images={cat:catImg,dog:dogImg,lion:lionImg,duck:duckImg,mouse:mouseImg,rabbit:rabbitImg,panda:pandaImg,pig:pigImg,racoon:racoonImg},ROOT=document.querySelector("#root"),[bgCanvas,bgCtx]=createCanvas("bg"),[gameCanvas,gameCtx]=createCanvas("game"),[effectCanvas,effectCtx]=createCanvas("effect"),[scoreCanvas,scoreCtx]=createCanvas("score"),[selectCanvas,selectCtx]=createCanvas("select"),[questCanvas,questCtx]=createCanvas("quest");bgCtx.translate(.5,.5);gameCtx.translate(.5,.5);effectCtx.translate(.5,.5);scoreCtx.translate(.5,.5);selectCtx.translate(.5,.5);const isMobile=()=>!!window.navigator.userAgent.match(/android|mobile/gi),SUB_OPTIONS={SIZE:{RATIO:1}},OPTIONS={SIZE:{UNIT:50},WIDTH:{GAME:{X:9,Y:9}},ANIMATION:{SPEED:isMobile()?.5:.1,FRAME:16},GAME:{TURN:75,HINT:5}},RESPONSIVE_UNIT_SIZE=()=>OPTIONS.SIZE.UNIT+SUB_OPTIONS.SIZE.RATIO,BG_COLOR="#dddddd",wait=[],RUN_MODE={}.VITE_RUN_MODE||"none",STORE_NAME="pang_store",BASE_TYPE_SCORE=[["dog",1],["duck",3],["mouse",4],["lion",6],["pig",7],["panda",8],["racoon",9]],TestCase2=[["dog","dog","dog","lion","lion","mouse","dog","mouse","cat"],["dog","dog","dog","mouse","dog","lion","lion","lion","mouse"],["dog","lion","lion","lion","dog","dog","mouse","dog","mouse"],["dog","dog","dog","lion","lion","mouse","dog","mouse","cat"],["dog","dog","lion","dog","mouse","dog","mouse","cat","lion"],["dog","mouse","mouse","mouse","dog","dog","lion","mouse","cat"],["mouse","lion","dog","dog","lion","dog","dog","mouse","mouse"],["mouse","lion","dog","dog","lion","dog","mouse","mouse","mouse"],["dog","lion","lion","mouse","dog","mouse","cat","cat","cat"]],set3=(obj,num)=>new Array(num).fill(0).map((ar,index)=>Object.assign({...obj},{title:obj.target+` 수집가 - ${index+1}`,content:`${obj.target}를 ${(2+index)*5}마리 잡으세요.`,amount:(2+index)*5,score:100*(index+1),turn:0,type:obj.type})),set3Turn=(obj,num)=>new Array(num).fill(0).map((ar,index)=>Object.assign({...obj},{title:obj.target+` 수집가 - ${index+1}`,content:`${obj.target}를 ${(2+index)*5}마리 잡으세요.`,amount:(2+index)*5,score:25*(index+1),turn:3*(index+1),type:obj.type})),QUEST_LIST_OBJ=[{title:"돼지가 너무 많아!",content:"돼지를 15마리 잡으세요.",amount:15,score:150,turn:0,type:"pig"},{title:"찍찍찌익!",content:"쥐를 30마리 잡으세요.",amount:30,score:300,turn:0,type:"mouse"},...set3({target:"팬더",type:"panda"},3),...set3({target:"돼지",type:"pig"},3),...set3({target:"사자",type:"lion"},3),...set3({target:"강아지",type:"dog"},3),...set3({target:"고양이",type:"cat"},3),...set3({target:"너구리",type:"racoon"},3),...set3({target:"오리",type:"duck"},3),...set3({target:"토끼",type:"rabbit"},3),...set3({target:"쥐",type:"mouse"},3),...set3Turn({target:"팬더",type:"panda"},3),...set3Turn({target:"돼지",type:"pig"},3),...set3Turn({target:"사자",type:"lion"},3),...set3Turn({target:"강아지",type:"dog"},3),...set3Turn({target:"고양이",type:"cat"},3),...set3Turn({target:"너구리",type:"racoon"},3),...set3Turn({target:"오리",type:"duck"},3),...set3Turn({target:"토끼",type:"rabbit"},3),...set3Turn({target:"쥐",type:"mouse"},3)];class Logger{constructor(name){__publicField(this,"name","SYS");__publicField(this,"_logger",console);__publicField(this,"directories",[]);__publicField(this,"only",()=>new Logger(this.name+":only"));this.name=name}convert(color,...data){return[]}reform(str){return`[${str}] >`}dir(dir){return this.directories.push(dir),this}get log(){const time=new Date().toLocaleTimeString("ko"),values=this._logger.log.bind(window.console,...this.convert("yellowBright"),`(${time})`);return this.clearDir(),values}get debug(){const time=new Date().toLocaleTimeString("ko"),values=this._logger.log.bind(window.console,...this.convert("blueBright"),`(${time})`);return this.clearDir(),values}get error(){const time=new Date().toLocaleTimeString("ko"),values=this._logger.log.bind(window.console,...this.convert("redBright"),`(${time})`);return this.clearDir(),values}clearDir(){this.directories=[]}}const _Quest=class _Quest{constructor(title,content,condition,result){__publicField(this,"id");__publicField(this,"title");__publicField(this,"content");__publicField(this,"currentAmount",0);__publicField(this,"condition");__publicField(this,"result",{score:0,turn:0});__publicField(this,"isDone",!1);__publicField(this,"isFail",!1);__publicField(this,"isDaily",!1);__publicField(this,"deletion",!1);__publicField(this,"logger");this.logger=new Logger("Quest"),this.id=_Quest.autoGenerate(),this.title=title,this.content=content,this.result.score=result.score||0,this.result.turn=result.turn||0,this.condition=Object.assign(condition,{amount:condition.amount}),this.logger.dir("constructor").log("current id",_Quest.id)}static createQuest({title,content,score,turn,type,amount}){return new _Quest(title,content,{type,amount},{score,turn})}success(){this.isDone=!0}fail(){this.isFail=!0}};__publicField(_Quest,"id",0),__publicField(_Quest,"autoGenerate",()=>_Quest.id+=1);let Quest=_Quest;class BaseModule{constructor(mode){__publicField(this,"mode","none");this.mode=mode}}class Animator extends BaseModule{constructor(mode){super(mode);__publicField(this,"logger");this.logger=new Logger(this.constructor.name),this.logger.dir("constructor").log("initialize mode:",mode)}}const capitalize=str=>str.charAt(0).toLowerCase()+str.slice(1),responseBlockAxis=(x,y)=>{const centerX=innerWidth/2,centerY=innerHeight/2,horizonValue=OPTIONS.WIDTH.GAME.X*RESPONSIVE_UNIT_SIZE(),verticalValue=OPTIONS.WIDTH.GAME.Y*RESPONSIVE_UNIT_SIZE(),halfHorizon=horizonValue/2,halfVertical=verticalValue/2,resX=centerX+x-halfHorizon,resY=centerY+y-halfVertical;return[resX,resY]},responsePointerAxis=(x,y)=>{const centerX=innerWidth/2,centerY=innerHeight/2,horizonValue=OPTIONS.WIDTH.GAME.X*RESPONSIVE_UNIT_SIZE(),verticalValue=OPTIONS.WIDTH.GAME.Y*RESPONSIVE_UNIT_SIZE(),halfHorizon=horizonValue/2,halfVertical=verticalValue/2,unitCenterX=Math.floor((x-centerX+halfHorizon)/RESPONSIVE_UNIT_SIZE()),unitCenterY=Math.floor((y-centerY+halfVertical)/RESPONSIVE_UNIT_SIZE());return[unitCenterX,unitCenterY]},_Cell=class _Cell{constructor(type,x,y,score){__publicField(this,"id");__publicField(this,"type");__publicField(this,"x");__publicField(this,"y");__publicField(this,"matched");__publicField(this,"isPang");__publicField(this,"score");__publicField(this,"isSelected");__publicField(this,"isHover");__publicField(this,"isInfo");__publicField(this,"isHint");__publicField(this,"logger");this.id=_Cell.autoIncrement,this.type=type,this.x=x,this.y=y,this.matched=!1,this.isPang=!1,this.score=score,this.isSelected=!1,this.isHover=!1,this.isInfo=!1,this.isHint=!1,_Cell.autoIncrement++,this.logger=new Logger("Cell")}getDirectionWith(dstCell){const srcX=this.x,srcY=this.y,dstX=dstCell.x,dstY=dstCell.y;return dstX>srcX?"right":dstXsrcY?"down":dstYresolver=resolve),fromX=this.x,toX=to,direction=fromX!==to&&fromX>to,move=setInterval(()=>{this.x+=fromX>to?-OPTIONS.ANIMATION.SPEED/2:OPTIONS.ANIMATION.SPEED/2,direction?toX>=this.x&&(clearInterval(move),resolver(!0),this.x=fromX):toX<=this.x&&(clearInterval(move),resolver(!0),this.x=fromX)},OPTIONS.ANIMATION.FRAME);return promise}moveY(to){let resolver;const promise=new Promise(resolve=>resolver=resolve),fromY=this.y,toY=to,direction=fromY!==to&&fromY>to,move=setInterval(()=>{this.y+=fromY>to?-OPTIONS.ANIMATION.SPEED/2:OPTIONS.ANIMATION.SPEED/2,direction?toY>=this.y&&(clearInterval(move),this.y=fromY,resolver(this)):toY<=this.y&&(clearInterval(move),this.y=fromY,resolver(this))},OPTIONS.ANIMATION.FRAME);return promise}swapEffect(target,direction){let resolver;const promise=new Promise(resolve=>resolver=resolve);switch(this.x,this.y,target.x,target.y,direction){case"left":case"right":Promise.all([this.moveX(target.x),target.moveX(this.x)]).then(()=>{resolver(!0)});break;case"up":case"down":Promise.all([this.moveY(target.y),target.moveY(this.y)]).then(()=>{resolver(!0)});break;default:setTimeout(()=>{resolver(!1)},0);break}return this.logger.dir("swapEffect").debug(`from ${this.type} to ${target.type} swapping...`),promise}pang(){this.type="",this.isPang=!0}highlight(type){const[x,y]=responseBlockAxis(this.x*RESPONSIVE_UNIT_SIZE(),this.y*RESPONSIVE_UNIT_SIZE());switch(type){case"hover":selectCtx.fillStyle="#56565656";break;case"select":selectCtx.fillStyle="#48c46e56";break}selectCtx.fillRect(x,y,RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE())}render(){const[x,y]=responseBlockAxis(this.x,this.y),image=images[this.type];image?(gameCtx.imageSmoothingQuality="low",gameCtx.imageSmoothingEnabled=!0,gameCtx.drawImage(image,Math.floor(this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x)),Math.floor(this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y)),RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE()),this.isInfo&&(selectCtx.fillStyle="green",selectCtx.font="bold 10px Arial",selectCtx.fillText(`[${this.type}] ${Math.floor(this.x)}, ${Math.floor(this.y)}`,Math.floor(this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x))+1,Math.floor(this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y))+8),selectCtx.font="",selectCtx.fillStyle="#000000",selectCtx.strokeStyle="#00000056",selectCtx.strokeRect(Math.floor(this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x)),Math.floor(this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y)),RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE()),selectCtx.strokeStyle="#000000"),this.isHint&&(selectCtx.strokeStyle="green",selectCtx.strokeRect(Math.floor(this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x)),Math.floor(this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y)),RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE()),selectCtx.fillStyle="#00ff0056",selectCtx.fillRect(Math.floor(this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x)),Math.floor(this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y)),RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE()),selectCtx.strokeStyle="#000000",selectCtx.fillStyle="#000000")):(gameCtx.fillStyle="#00000000",gameCtx.fillRect(this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x),this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y),RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE())),this.isSelected&&this.highlight("select")}renderOtherCanvas(ctx){const[x,y]=responseBlockAxis(this.x,this.y),image=images[this.type];image?ctx.drawImage(image,this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x),this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y),RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE()):(ctx.fillStyle="#00000000",ctx.fillRect(this.x*RESPONSIVE_UNIT_SIZE()+Math.floor(x-this.x),this.y*RESPONSIVE_UNIT_SIZE()+Math.floor(y-this.y),RESPONSIVE_UNIT_SIZE(),RESPONSIVE_UNIT_SIZE()))}static copy(cell,toCell){return new _Cell(cell.type,toCell.x,toCell.y,cell.score)}static is(srcCell,dstCell){const{x:x1,y:y1}=srcCell,{x:x2,y:y2}=dstCell;return x1===x2&&y1===y2}deepCopySelf(){return new _Cell(this.type,this.x,this.y,this.score)}deepCopy(cell){return new _Cell(cell.type,cell.x,cell.y,cell.score)}deepCopyWithAxis(cell,x,y){return new _Cell(cell.type,x,y,cell.score)}};__publicField(_Cell,"autoIncrement",0);let Cell=_Cell;class BlockManager extends BaseModule{constructor(mode,scoreCalculator,questManager){super(mode);__publicField(this,"types",BASE_TYPE_SCORE);__publicField(this,"logger");__publicField(this,"blockSize",{x:50,y:50});__publicField(this,"map",[]);__publicField(this,"scoreCalculator");__publicField(this,"questManager");__publicField(this,"dupRemove",!1);__publicField(this,"animalsPang",{cat:0,dog:0,lion:0,duck:0,mouse:0,rabbit:0,panda:0,pig:0,racoon:0});this.logger=new Logger(this.constructor.name),this.logger.dir("constructor").log("initialize mode:",mode),this.scoreCalculator=scoreCalculator,this.questManager=questManager}containsType(type){return this.types.some(types=>types[0]===type)}scoreUp(score){this.scoreCalculator.scoreUp(score)}async initialize(){if(wait.push(0),this.dupRemove=!1,this.mode!=="test"){const map=this.createMap([OPTIONS.WIDTH.GAME.X,OPTIONS.WIDTH.GAME.Y]);return this.logger.dir("initialize").log("created map",map),this.map=map,await this.removeDuplicate(),map}else{if(TestCase2.length!==OPTIONS.WIDTH.GAME.Y||TestCase2[0].length!==OPTIONS.WIDTH.GAME.X)throw new Error("Invalid map size");const map=this.createCustomMap(TestCase2);return await this.removeDuplicate(),this.logger.dir("initialize").log("created custom map",map),this.map=map,map}}resetScore(){this.scoreCalculator.resetCombos(),this.scoreCalculator.resetScores(),this.scoreCalculator.resetTurns()}resetQuest(){this.questManager.resetQuest()}async removeDuplicate(){let resolver;const promise=new Promise(resolve=>{resolver=resolve}),BASE_VALUE={FRAME:OPTIONS.ANIMATION.FRAME,SPEED:OPTIONS.ANIMATION.SPEED};return OPTIONS.ANIMATION.FRAME=0,OPTIONS.ANIMATION.SPEED=100,this.logger.dir("removeDuplicate").log("start remove"),await this.autoPangAndFill(),this.logger.dir("removeDuplicate").log("done remove"),this.resetScore(),this.resetQuest(),OPTIONS.ANIMATION.FRAME=BASE_VALUE.FRAME,OPTIONS.ANIMATION.SPEED=BASE_VALUE.SPEED,this.dupRemove=!0,setTimeout(()=>{resolver(!0)},16),promise}getCellScoreByType(type){const index=this.types.findIndex(typeScore=>typeScore[0]===type);return this.types[index][1]}getRandomCellType(){const randomTypeIndex=Math.floor(Math.random()*this.types.length);return this.types[randomTypeIndex]}createMap([xSize,ySize]){const maps=[];for(let y=0;yrow.map((cell,x)=>new Cell(cell,x,y,this.getCellScoreByType(cell))))}mockisInBoundary(mockMap,srcCell,dstCell){var _a,_b,_c,_d;const srcX=srcCell==null?void 0:srcCell.x,srcY=srcCell==null?void 0:srcCell.y;if(srcX===void 0||srcY===void 0)return!1;const topCell=(_a=mockMap[srcY-1])==null?void 0:_a[srcX],bottomCell=(_b=mockMap[srcY+1])==null?void 0:_b[srcX],leftCell=(_c=mockMap[srcY])==null?void 0:_c[srcX-1],rightCell=(_d=mockMap[srcY])==null?void 0:_d[srcX+1];return topCell===dstCell||bottomCell===dstCell||leftCell===dstCell||rightCell===dstCell}isInBoundary(srcCell,dstCell){var _a,_b,_c,_d;this.logger.dir("isInBoundary").debug("srcCell","dstCell",srcCell,dstCell);const srcX=srcCell==null?void 0:srcCell.x,srcY=srcCell==null?void 0:srcCell.y;if(srcX===void 0||srcY===void 0)return!1;const topCell=(_a=this.map[srcY-1])==null?void 0:_a[srcX],bottomCell=(_b=this.map[srcY+1])==null?void 0:_b[srcX],leftCell=(_c=this.map[srcY])==null?void 0:_c[srcX-1],rightCell=(_d=this.map[srcY])==null?void 0:_d[srcX+1],isIn=topCell===dstCell||bottomCell===dstCell||leftCell===dstCell||rightCell===dstCell;return this.logger.dir("swapBothCell").dir("isInBoundary").debug(isIn),isIn}inLinePang(srcCell,dstCell,direction){this.logger.dir("inLinePang").debug("validating pangable line by dst cell.");const horizonPangList=[],verticalPangList=[];if(direction==="left"){const upSrcLinePang=this.upLinePang(srcCell),downSrcLinePang=this.downLinePang(srcCell),leftSrcLinePang=this.leftLinePang(srcCell),upDstLinePang=this.upLinePang(dstCell),downDstLinePang=this.downLinePang(dstCell),rightDstLinePang=this.rightLinePang(dstCell),concatSrcUpDown=[...new Set([...upSrcLinePang,...downSrcLinePang])],concatDstUpDown=[...new Set([...upDstLinePang,...downDstLinePang])],concatSrcLeft=[...new Set(leftSrcLinePang)],concatDstRight=[...new Set(rightDstLinePang)];concatSrcUpDown.length>2&&verticalPangList.push(...concatSrcUpDown),concatDstUpDown.length>2&&verticalPangList.push(...concatDstUpDown),concatSrcLeft.length>2&&horizonPangList.push(...concatSrcLeft),concatDstRight.length>2&&horizonPangList.push(...concatDstRight)}else if(direction==="right"){const upDstLinePang=this.upLinePang(dstCell),downDstLinePang=this.downLinePang(dstCell),leftDstLinePang=this.leftLinePang(dstCell),upSrcLinePang=this.upLinePang(srcCell),downSrcLinePang=this.downLinePang(srcCell),rightSrcLinePang=this.rightLinePang(srcCell),concatSrcUpDown=[...new Set([...upSrcLinePang,...downSrcLinePang])],concatDstUpDown=[...new Set([...upDstLinePang,...downDstLinePang])],concatDstLeft=[...new Set(leftDstLinePang)],concatSrcRight=[...new Set(rightSrcLinePang)];concatSrcUpDown.length>2&&verticalPangList.push(...concatSrcUpDown),concatDstUpDown.length>2&&verticalPangList.push(...concatDstUpDown),concatDstLeft.length>2&&horizonPangList.push(...concatDstLeft),concatSrcRight.length>2&&horizonPangList.push(...concatSrcRight)}else if(direction==="up"){const upSrcLinePang=this.upLinePang(srcCell),leftSrcLinePang=this.leftLinePang(srcCell),rightSrcLinePang=this.rightLinePang(srcCell),downDstLinePang=this.downLinePang(dstCell),leftDstLinePang=this.leftLinePang(dstCell),rightDstLinePang=this.rightLinePang(dstCell),concatSrcLeftRight=[...new Set([...leftSrcLinePang,...rightSrcLinePang])],concatDstLeftRight=[...new Set([...leftDstLinePang,...rightDstLinePang])],concatSrcUp=[...new Set(upSrcLinePang)],concatDstDown=[...new Set(downDstLinePang)];concatSrcLeftRight.length>2&&verticalPangList.push(...concatSrcLeftRight),concatDstLeftRight.length>2&&verticalPangList.push(...concatDstLeftRight),concatSrcUp.length>2&&horizonPangList.push(...concatSrcUp),concatDstDown.length>2&&horizonPangList.push(...concatDstDown)}else if(direction==="down"){const upDstLinePang=this.upLinePang(dstCell),leftDstLinePang=this.leftLinePang(dstCell),rightDstLinePang=this.rightLinePang(dstCell),downSrcLinePang=this.downLinePang(srcCell),leftSrcLinePang=this.leftLinePang(srcCell),rightSrcLinePang=this.rightLinePang(srcCell),concatDstLeftRight=[...new Set([...leftDstLinePang,...rightDstLinePang])],concatSrcLeftRight=[...new Set([...leftSrcLinePang,...rightSrcLinePang])],concatDstUp=[...new Set(upDstLinePang)],concatSrcDown=[...new Set(downSrcLinePang)];concatSrcLeftRight.length>2&&verticalPangList.push(...concatSrcLeftRight),concatDstLeftRight.length>2&&verticalPangList.push(...concatDstLeftRight),concatDstUp.length>2&&horizonPangList.push(...concatDstUp),concatSrcDown.length>2&&horizonPangList.push(...concatSrcDown)}return this.logger.dir("inLinePang").dir("collected pang list").debug(horizonPangList,verticalPangList),[horizonPangList,verticalPangList]}upLinePang(targetCell){const targetX=targetCell.x,targetY=targetCell.y,temp=[targetCell];for(let y=targetY-1;y>=0;y--){const cell=this.map[y][targetX];if(cell.type===targetCell.type){temp.push(this.map[y][targetX]),this.logger.dir("upLinePang").debug("cell count",y);continue}this.logger.dir("upLinePang").error("cell is not matched type",cell);break}return this.logger.dir("upLinePang").log("pang list",temp),temp}downLinePang(targetCell){const targetX=targetCell.x,targetY=targetCell.y,temp=[targetCell];for(let y=targetY+1;y=0;x--){const cell=this.map[targetY][x];if(cell.type===targetCell.type){temp.push(this.map[targetY][x]);continue}this.logger.dir("leftLinePang").error("cell is not matched type",cell);break}return this.logger.dir("leftLinePang").log("pang list",temp),temp}rightLinePang(targetCell){const targetX=targetCell.x,targetY=targetCell.y,temp=[targetCell];for(let x=targetX+1;xresolver=resolve);return setTimeout(()=>{this.swapBothCell(srcCell,dstCell).then(()=>{resolver(!0)})},150),promise}async swapBothCell(srcCell,dstCell){var _a,_b,_c,_d;if(this.logger.dir("swapBothCell").debug("before swap both cell:",this.map),this.logger.dir("swapBothCell").dir("src").debug("get both cell in this.map",(_a=this.map[srcCell==null?void 0:srcCell.y])==null?void 0:_a[srcCell==null?void 0:srcCell.x]),this.logger.dir("swapBothCell").dir("dest").debug("get both cell in this.map",(_b=this.map[dstCell==null?void 0:dstCell.y])==null?void 0:_b[dstCell==null?void 0:dstCell.x]),!((_c=this.map[srcCell==null?void 0:srcCell.y])!=null&&_c[srcCell==null?void 0:srcCell.x])||!((_d=this.map[dstCell==null?void 0:dstCell.y])!=null&&_d[dstCell==null?void 0:dstCell.x]))return!1;try{if(!this.isInBoundary(srcCell,dstCell))return!1}catch(error){return console.error(error),!1}const swapDirection=srcCell.getDirectionWith(dstCell);if(swapDirection===null)return!1;this.logger.dir("swapBothCell").log(swapDirection),await srcCell.swapEffect(dstCell,swapDirection)||this.logger.dir("swapBothCell").error("swap error"),this.logger.dir("swapBothCell").debug("success swapEffect.");const destCopyCell=Cell.copy(dstCell,srcCell),srcCopyCell=Cell.copy(srcCell,dstCell);this.map[srcCell.y][srcCell.x]=destCopyCell,this.map[dstCell.y][dstCell.x]=srcCopyCell;const swapedSrcCell=this.map[srcCell.y][srcCell.x],swapedDstCell=this.map[dstCell.y][dstCell.x];this.logger.dir("swapBothCell").dir("check src").debug(swapedSrcCell),this.logger.dir("swapBothCell").dir("check dst").debug(swapedDstCell);const pangResult=this.inLinePang(swapedDstCell,swapedSrcCell,swapDirection);return pangResult.every(cell=>cell.length===0)?(this.logger.dir("swapBothCell").debug("no matched cell line"),!1):(pangResult.flat(1).forEach(cell=>{this.animalsPang[cell.type]+=1,this.questManager.questAmountUp(cell.type),cell.pang(),this.scoreCalculator.scoreUp(cell.score)}),!0)}async swapBothCellAndFill(srcCell,dstCell){return await this.swapBothCell(srcCell,dstCell)?(await this.searchColumnsAndFillEmptyCell(),!0):(this.logger.dir("swapBothCellAndFill").error("not swapped"),!1)}getColumnLineFromStartPoint(x,startPoint){const yValue=startPoint,temp=[];for(let level=0;level<=yValue;level++){const cell=this.map[level][x];cell&&temp.push(cell)}return temp}getMockColumnLine(mockMap,x){const yValue=OPTIONS.WIDTH.GAME.Y,temp=[];for(let level=0;level(row.length>3&&(acc+=row[0].score*row.slice(3).length),acc),0),columnScores=columns.reduce((acc,column)=>(column.length>3&&(acc+=column[0].score*column.slice(3).length),acc),0);return this.logger.dir("getPangableList").debug("추가 점수:",rowScores+columnScores),[...new Set([...rows,...columns].flat(1))]}getPangableList(){const rows=this.searchRowsAndFilterPangable(),columns=this.searchColumnsAndFilterPangable();this.logger.dir("getPangableList").debug("pagable",rows,columns);const rowScores=rows.reduce((acc,row)=>(row.length>3&&(acc+=row[0].score*row.slice(3).length),acc),0),columnScores=columns.reduce((acc,column)=>(column.length>3&&(acc+=column[0].score*column.slice(3).length),acc),0);return this.logger.dir("getPangableList").debug("추가 점수:",rowScores+columnScores),[...new Set([...rows,...columns].flat(1))]}mockingPangableColumnLines(){const mockMap=this.mockingMap(),isSuccess=[];for(const row of mockMap)for(const column in row){const[src,dst]=this.mockSwapBothCell(mockMap,row[Number(column)],row[Number(column)+1]),pangableColumns=this.searchMockColumnsAndFilterPangable(mockMap).map(group=>group.map(cell=>{const isSameSrc=Cell.is(src,cell),isSameDst=Cell.is(dst,cell);return isSameSrc?dst:isSameDst?src:cell.deepCopySelf()})),pangableRows=this.searchMockRowsAndFilterPangable(mockMap).map(group=>group.map(cell=>{const isSameSrc=Cell.is(src,cell),isSameDst=Cell.is(dst,cell);return isSameSrc?dst:isSameDst?src:cell.deepCopySelf()}));this.mockRevertSwap(mockMap,src,dst);const removeDup=[...pangableColumns,...pangableRows];removeDup.length>0&&isSuccess.push(...removeDup)}return isSuccess}mockingPangableRowLines(){const mockMap=this.mockingMap(),isSuccess=[];for(let column=0;columngroup.map(cell=>{const isSameSrc=Cell.is(src,cell),isSameDst=Cell.is(dst,cell);return isSameSrc?dst:isSameDst?src:cell.deepCopySelf()})),pangableRows=this.searchMockRowsAndFilterPangable(mockMap).map(group=>group.map(cell=>{const isSameSrc=Cell.is(src,cell),isSameDst=Cell.is(dst,cell);return isSameSrc?dst:isSameDst?src:cell.deepCopySelf()}));this.mockRevertSwap(mockMap,src,dst);const removeDup=[...new Set([...pangableColumns,...pangableRows])];removeDup.length>0&&isSuccess.push(...removeDup)}}return isSuccess}mockingMap(){return[...this.map].map(row=>row.map(cell=>cell.deepCopySelf()))}mockRevertSwap(mockMap,srcCell,dstCell){return this.mockSwapBothCell(mockMap,srcCell,dstCell)}mockSwapBothCell(mockMap,srcCell,dstCell){var _a,_b;if(!((_a=mockMap[srcCell==null?void 0:srcCell.y])!=null&&_a[srcCell==null?void 0:srcCell.x])||!((_b=mockMap[dstCell==null?void 0:dstCell.y])!=null&&_b[dstCell==null?void 0:dstCell.x]))return[];try{if(!this.mockisInBoundary(mockMap,srcCell,dstCell))return[]}catch(error){return console.error(error),[]}if(srcCell.getDirectionWith(dstCell)===null)return[];const destCopyCell=Cell.copy(dstCell,srcCell),srcCopyCell=Cell.copy(srcCell,dstCell);mockMap[srcCell.y][srcCell.x]=destCopyCell,mockMap[dstCell.y][dstCell.x]=srcCopyCell;const swapedSrcCell=mockMap[srcCell.y][srcCell.x],swapedDstCell=mockMap[dstCell.y][dstCell.x];return[swapedSrcCell,swapedDstCell]}async autoPangAndFill(loop=!0){const rows=this.searchRowsAndFilterPangable(),columns=this.searchColumnsAndFilterPangable();this.logger.dir("getPangableList").debug(rows.length,columns.length);for(let i=0;i{this.animalsPang[cell.type]+=1,this.questManager.questAmountUp(cell.type),cell.pang(),this.scoreCalculator.scoreUp(cell.score)}),await this.searchEmptyColumnsAndFill();const isDone=this.getPangableList().length===0;if(this.logger.dir("autoPangAndFill").log("isDone",isDone),loop&&!isDone)return await this.autoPangAndFill();const resultColumns=this.mockingPangableColumnLines(),resultRows=this.mockingPangableRowLines();return this.logger.dir("autoPangAndFill").dir("check mocking pangable").debug(resultColumns||resultRows),resultColumns.length>0||resultRows.length>0||this.logger.dir("autoPangAndFill").dir("check mocking pangable").error("required reset game"),isDone}getHint(){const resultColumns=this.mockingPangableColumnLines(),resultRows=this.mockingPangableRowLines();[...resultColumns,...resultRows][0].forEach(cell=>{this.map[cell.y][cell.x].isHint=!0})}async searchEmptyColumnsAndFill(){new Promise(resolve=>resolve);const promises=[];for(let index=0;index{cell.moveY(idxx).then(()=>{cell.y=idxx,resolve(cell)})}))}return Promise.all(promises)}searchMockRowsAndFilterPangable(mockMap,round=2){var _a,_b,_c;const rowTemp=[];for(const row of mockMap){for(const cell of row){const isEmpty=rowTemp.length===0,isEmptyLastArray=((_a=rowTemp[rowTemp.length-1])==null?void 0:_a.length)===0,isDifferenceType=((_c=(_b=rowTemp[rowTemp.length-1])==null?void 0:_b[0])==null?void 0:_c.type)!==cell.type;(isEmpty||isEmptyLastArray||isDifferenceType)&&rowTemp.push([]),rowTemp[rowTemp.length-1].push(cell)}rowTemp.push([])}return rowTemp.filter(row=>row.length>round)}searchMockColumnsAndFilterPangable(mockMap,round=2){var _a,_b,_c;const columnTemp=[];for(let index=0;indexcolumn.length>round)}searchRowsAndFilterPangable(round=2){var _a,_b,_c;const rowTemp=[];for(const row of this.map){for(const cell of row){const isEmpty=rowTemp.length===0,isEmptyLastArray=((_a=rowTemp[rowTemp.length-1])==null?void 0:_a.length)===0,isDifferenceType=((_c=(_b=rowTemp[rowTemp.length-1])==null?void 0:_b[0])==null?void 0:_c.type)!==cell.type;(isEmpty||isEmptyLastArray||isDifferenceType)&&rowTemp.push([]),rowTemp[rowTemp.length-1].push(cell)}rowTemp.push([])}return rowTemp.filter(row=>row.length>round)}searchColumnsAndFilterPangable(round=2){var _a,_b,_c;const columnTemp=[];for(let index=0;indexcolumn.length>round)}async searchColumnsAndFillEmptyCell(){this.logger.dir("searchColumnsAndFillEmptyCell").log("start search empty column and fill cells...");const promises=[];for(let index=0;indexcell.type!=="")}async columnFillNewAnimals(x){const[startPoint,emptyAmount]=this.getEmptyStartPointAndAmount(x),columnLine=this.getColumnLine(x),filterCells=this.filterEmptyCell(columnLine),concatOriginAndNewCells=this.fillNewCells(filterCells,emptyAmount,x),animationTemp=[];concatOriginAndNewCells.forEach(cell=>{var _a,_b;const copyCell=cell.deepCopySelf();animationTemp.push(copyCell),(_b=(_a=this.map)==null?void 0:_a[cell.y])!=null&&_b[cell.x]&&(this.map[cell.y][cell.x]=copyCell)});const promiseTemp=[];for(const tempCell of animationTemp){let resolver;const aniPromise=new Promise(resolve=>resolver=resolve);promiseTemp.push(aniPromise);const tempCellY=tempCell.y;tempCell.y-=emptyAmount;const aniLoop=setInterval(()=>{tempCell.y+=OPTIONS.ANIMATION.SPEED/2,tempCell.y>=tempCellY&&(tempCell.y=tempCellY,clearInterval(aniLoop),resolver(!0))},OPTIONS.ANIMATION.FRAME)}return Promise.all(promiseTemp)}findEmptyCell(cells){return cells.find(cell=>cell.type==="")}filterEmptyCell(cells){return cells.filter(cell=>cell.type!=="")}fillNewCells(origin,emptyAmount,x){origin[0].y;const tempEmptyAmount=emptyAmount,temp=origin.map(cell=>cell.deepCopySelf());for(let index=1;index<=tempEmptyAmount;index++){const[type,score]=this.getRandomCellType(),copyCell=new Cell(type,x,1-index-1,score);temp.unshift(copyCell)}return temp}getEmptyStartPointAndAmount(x){const yValue=OPTIONS.WIDTH.GAME.Y-1;let startPoint=-1,emptyAmount=0;for(let level=yValue;level>=0;level--){const cell=this.map[level][x];cell.type===""&&(emptyAmount+=1,startPointcell.isSelected=!1)}}class Pointer extends BaseModule{constructor(mode){super(mode);__publicField(this,"logger");__publicField(this,"dependency",{});__publicField(this,"grab",null);__publicField(this,"swapTemp",[]);__publicField(this,"gameEnd",!1);this.logger=new Logger(this.constructor.name),this.logger.dir("constructor").log("initialize mode:",mode),window.addEventListener("mousemove",this.moveMouse.bind(this)),window.addEventListener("mousedown",this.clickCell.bind(this))}inject(module){this.logger.dir("inject").debug(`${capitalize(module.constructor.name)} is injected`),this.dependency[capitalize(module.constructor.name)]=module}async clickCell(){var _a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n;if(this.mode==="test"){wait.length===0?(this.logger.only().dir("test").dir("clickCell").log("auto pang"),wait.push(0),await((_a=this.dependency.blockManager)==null?void 0:_a.autoPangAndFill(!1)),this.logger.debug(this.grab),wait.pop()):this.logger.only().dir("test").dir("clickCell").error("blocked click event");return}if(this.logger.dir("clickCell").dir("debug wait").debug("!!!!!!!!wait",wait),wait.length>0){this.logger.dir("clickCell").error("current working click event",wait),this.swapTemp=[];return}if(this.grab){if(this.logger.dir("clickCell").debug(this.grab),this.swapTemp.length<2&&(this.grab.isSelected=!0,this.swapTemp.push(this.grab),this.logger.dir("clickCell").log(this.swapTemp),this.logger.dir("clickCell").dir("select first cell").debug(this.swapTemp[0])),this.swapTemp.length===2){if(this.logger.dir("clickCell").log(this.swapTemp),this.logger.dir("clickCell").log("this.swapTemp length",2),this.dependency.blockManager&&this.swapTemp[0]!==this.swapTemp[1]&&wait.length===0){this.logger.dir("clickCell").dir("select second cell").debug(this.grab),wait.push(0),this.logger.dir("clickCell").log("swap both run");const isBoundary=this.dependency.blockManager.isInBoundary(this.swapTemp[0],this.swapTemp[1]);this.logger.dir("clickCell").debug("isBoundary",isBoundary),isBoundary&&((_b=this.dependency.scoreCalculator)==null||_b.turnCount());try{if(!await this.dependency.blockManager.swapBothCell(this.swapTemp[0],this.swapTemp[1])){this.logger.dir("swapBothCellAndFill").error("not swapped"),isBoundary&&((_c=this.dependency.scoreCalculator)==null||_c.divideCombo());const first=(_h=(_e=this.dependency.blockManager.map)==null?void 0:_e[(_d=this.swapTemp[0])==null?void 0:_d.y])==null?void 0:_h[(_g=(_f=this.swapTemp)==null?void 0:_f[0])==null?void 0:_g.x],second=(_m=(_j=this.dependency.blockManager.map)==null?void 0:_j[(_i=this.swapTemp[1])==null?void 0:_i.y])==null?void 0:_m[(_l=(_k=this.swapTemp)==null?void 0:_k[1])==null?void 0:_l.x];await this.dependency.blockManager.revertSwap(first,second),await this.dependency.blockManager.autoPangAndFill(),wait.pop(),this.swapTemp[0]&&(this.swapTemp[0].isSelected=!1),this.swapTemp[1]&&(this.swapTemp[1].isSelected=!1),this.swapTemp=[];return}}catch{return}await this.dependency.blockManager.autoPangAndFill(),this.logger.dir("clickCell").debug("release??"),wait.pop(),this.swapTemp[0]&&(this.swapTemp[0].isSelected=!1),this.swapTemp[1]&&(this.swapTemp[1].isSelected=!1),this.logger.dir("clickCell").log("swap both end")}this.logger.dir("clickCell").log(this.swapTemp),this.swapTemp[0]&&(this.swapTemp[0].isSelected=!1),this.swapTemp[1]&&(this.swapTemp[1].isSelected=!1),this.swapTemp=[],this.logger.dir("clickCell").log(this.swapTemp)}this.logger.dir("clickCell2").debug(this.swapTemp)}else this.logger.dir("clickCell").debug("no grab");this.logger.dir("clickCell").debug("map",(_n=this.dependency.blockManager)==null?void 0:_n.map)}moveMouse(e){const x=e.clientX,y=e.clientY,[resX,resY]=responsePointerAxis(x,y);try{if(this.gameEnd)throw new Error("the game end");const cell=this.getCellInfo(resX,resY);this.grab=cell,this.grab.isHover||(this.grab.isHover=!0)}catch{this.grab=null}}getCellInfo(x,y){var _a,_b;if(this.dependency.mapGenerator){const cell=(_b=(_a=this.dependency.mapGenerator.map)==null?void 0:_a[y])==null?void 0:_b[x];if(cell)return cell;throw new Error("not found cell")}throw new Error("no injected module")}}class QuestManager{constructor(mode){__publicField(this,"id");__publicField(this,"mode");__publicField(this,"quests",[]);__publicField(this,"logger");__publicField(this,"lineGap",16*1.3);__publicField(this,"animalsPang",{cat:0,dog:0,lion:0,duck:0,mouse:0,rabbit:0,panda:0,pig:0,racoon:0});__publicField(this,"dependency",{});__publicField(this,"deleteQueue",[]);this.mode=mode,this.logger=new Logger(this.constructor.name),this.logger.dir("constructor").log("initialize mode:",mode)}inject(module){this.logger.dir("inject").debug(`${capitalize(module.constructor.name)} is injected`),this.dependency[capitalize(module.constructor.name)]=module}resetQuest(){this.quests=[],this.deleteQueue=[],this.autoQuests()}addQuest(a,b,c,d){if(!(a instanceof Quest)&&b&&c!==void 0&&d){this.logger.dir("addQuest").log("add new quest");const newQeust=new Quest(a,b,c,d);this.quests.push(newQeust)}else if(a instanceof Quest)this.logger.dir("addQuest").log("add new quest"),this.quests.push(a);else throw new Error("Invalid quest arguments")}removeQuest(quest){quest.deletion=!0,this.deleteQueue.push(quest)}autoQuests(){if(this.dependency.blockManager)for(;this.quests.length<2;){const obj=QUEST_LIST_OBJ[Math.floor(QUEST_LIST_OBJ.length*Math.random())],randomQuest=new Quest(obj.title,obj.content,{type:obj.type,amount:obj.amount},{score:obj.score,turn:obj.turn});!this.quests.some(q=>q.condition.type===randomQuest.condition.type)&&this.dependency.blockManager.containsType(randomQuest.condition.type)?this.quests.push(randomQuest):(this.logger.dir("autoQuests").debug("Quest id minus",Quest.id),Quest.id-=1)}}questAmountUp(type){const quests=this.quests.filter(quest=>quest.condition.type===type);this.logger.dir("questAmountUp").debug(type),quests.forEach(quest=>{quest.currentAmount+=1})}getLineGroup(quest,base,contentVisible){questCtx.font="bold 16px Arial",questCtx.fillText(`${quest.title} (+${quest.result.score}P)${quest.result.turn>0?` (+${quest.result.turn}T)`:""}`,50,base),quest.isDone&&questCtx.fillRect(50,base-6,questCtx.measureText(quest.title+` (+${quest.result.score}P)`).width,1),questCtx.font="normal 16px Arial",contentVisible&&(questCtx.fillText(quest.content,50,base+this.lineGap*1),quest.isDone&&questCtx.fillRect(50,base+this.lineGap*1-6,questCtx.measureText(quest.content).width,1)),questCtx.fillText(`${quest.currentAmount}/${quest.condition.amount}`,50,base+this.lineGap*(contentVisible?2:1)),quest.isDone&&questCtx.fillRect(50,base+this.lineGap*(contentVisible?2:1)-6,questCtx.measureText(`${quest.currentAmount}/${quest.condition.amount}`).width,1)}render(){var _a,_b;const contentVisible=!!isMobile()&&innerHeight>800,topBase=(()=>innerWidth>900?contentVisible?120:50:contentVisible?70:45)(),responseRatio=(()=>innerWidth>900?contentVisible?50:100:innerWidth<=900&&innerWidth>=500?contentVisible?50:90:contentVisible?90:95)();for(const quest of this.quests){const base=this.quests.indexOf(quest)*topBase+responseRatio;this.getLineGroup(quest,base,contentVisible),quest.currentAmount>=quest.condition.amount&&(quest.isDone||(quest.success(),(_a=this.dependency.scoreCalculator)==null||_a.scoreUp(quest.result.score),(_b=this.dependency.scoreCalculator)==null||_b.turnUp(quest.result.turn),this.logger.dir("success").log(`clear quest, get score +${quest.result.score}`),this.removeQuest(quest)))}for(questCtx.font="normal 16px Arial";this.deleteQueue.length>0;){const quest=this.deleteQueue.shift();quest&&(this.logger.dir("while").dir("if").debug(quest),setTimeout(()=>{const index=this.quests.findIndex(q=>q.id===quest.id);this.logger.dir("while").dir("index").debug(index),index>-1&&this.quests.splice(index,1),this.logger.dir("while").dir("check").debug(this.quests),this.autoQuests()},3e3))}}}class ScoreCalculator extends BaseModule{constructor(mode){super(mode);__publicField(this,"logger");__publicField(this,"hint",5);__publicField(this,"scores",0);__publicField(this,"turn",0);__publicField(this,"combo",0);__publicField(this,"scoreIncrementRatioByCombo",1);mode==="none"?this.turn=OPTIONS.GAME.TURN:mode==="test"&&(this.turn=1/0),this.logger=new Logger(this.constructor.name),this.logger.dir("constructor").log("initialize mode:",mode)}scoreUp(score){this.scores+=score*this.scoreIncrementRatioByCombo,this.logger.dir("scoreUp").debug("get score",score)}turnUp(turn=0){this.turn+=turn}turnCount(){this.logger.dir("turnCount").debug("count minus",this.turn),this.turn-=1}countUpCombo(){this.combo+=1,this.logger.dir("countUpCombo").debug("count up combo",this.combo)}showHint(){this.hint-=1}calculateScoreIncrementRatioByCombo(){this.combo<10?this.scoreIncrementRatioByCombo=1:this.combo<30&&this.combo>=10?this.scoreIncrementRatioByCombo=2:this.combo<50&&this.combo>=30?this.scoreIncrementRatioByCombo=3:this.combo<70&&this.combo>=50?this.scoreIncrementRatioByCombo=4:this.combo<90&&this.combo>=70?this.scoreIncrementRatioByCombo=5:this.combo>=90&&(this.scoreIncrementRatioByCombo=6)}resetHints(){this.hint=OPTIONS.GAME.HINT}resetTurns(){this.turn=OPTIONS.GAME.TURN}resetScores(){this.scores=0}resetCombos(){this.combo=0,this.scoreIncrementRatioByCombo=1,this.logger.dir("resetCombo").debug("reset combo",this.combo)}minusCombo(combo){this.combo-=combo}divideCombo(){this.combo=Math.floor(this.combo/2)}popupEndModal(){const wrap=document.createElement("div");wrap.id="modal",wrap.innerHTML=` + + + `,document.body.append(wrap)}popupShuffleModal(){const wrap=document.createElement("div");wrap.id="modal",wrap.innerHTML=` + + + `,document.body.append(wrap)}render(){this.calculateScoreIncrementRatioByCombo(),scoreCtx.font="bold 16px Arial",scoreCtx.textAlign="left",scoreCtx.fillStyle="#000000";const scoreText=`score: ${this.scores} Point${this.scores>1?"s":""} Hint: ${this.hint}`;scoreCtx.fillText(scoreText,50,50-(isMobile()?20:0)),this.turn>5&&this.turn<10?scoreCtx.fillStyle="#ffff00":this.turn<=5&&(scoreCtx.fillStyle="#ff0000");const turnText=`turn: ${this.turn} Turn${this.turn>1?"s":""}`;scoreCtx.fillText(turnText,50,70-(isMobile()?20:0)),scoreCtx.fillText(`Combo: ${this.combo}`,scoreCtx.measureText(turnText).width+50+10,70-(isMobile()?20:0))}}class StoreManager extends BaseModule{constructor(mode,storeName){super(mode);__publicField(this,"storeName");__publicField(this,"logger");__publicField(this,"store",[]);this.logger=new Logger(this.constructor.name),this.logger.dir("constructor").log("initialize mode:",mode),this.storeName=storeName||"pang_store",this.getData()}getLocalStorage(){return JSON.parse(localStorage.getItem(this.storeName)||"[]")}saveLocalStorage(){localStorage.setItem(this.storeName,JSON.stringify(this.store))}saveStore(data){this.store=data}getStore(){return this.store}getData(){const data=this.getLocalStorage();this.saveStore(data)}saveData(data){this.saveStore(data),this.saveLocalStorage()}addData(data){this.store.push(data),this.saveLocalStorage()}}class GameCore extends BaseModule{constructor(){super(RUN_MODE);__publicField(this,"seek",0);__publicField(this,"blockManager");__publicField(this,"animator");__publicField(this,"mapGenerator");__publicField(this,"scoreCalculator");__publicField(this,"storeManager");__publicField(this,"pointer");__publicField(this,"questManager");__publicField(this,"logger");__publicField(this,"canvases",[]);__publicField(this,"gameEnd",!1);__publicField(this,"_dev");__publicField(this,"_runMode");__publicField(this,"_baseWidth",innerWidth);__publicField(this,"_baseHeight",innerHeight);__publicField(this,"_storeName");__publicField(this,"_animation");__publicField(this,"questQueue",[]);__publicField(this,"handleResizeCanvasSize",()=>{this.logger.dir("setupCanvas").dir("handleResizeCanvasSize").log("resize all canvas");for(const canvas of this.canvases)canvas.width=innerWidth,canvas.height=innerHeight,this.logger.dir("handleResizeCanvasSize").dir("if").debug(this._baseWidth,innerWidth,RESPONSIVE_UNIT_SIZE()),innerWidth<=280?SUB_OPTIONS.SIZE.RATIO=-25:innerWidth<=375?SUB_OPTIONS.SIZE.RATIO=-15:innerWidth<=390?SUB_OPTIONS.SIZE.RATIO=-14:innerWidth<=393?SUB_OPTIONS.SIZE.RATIO=-15:innerWidth<=414?SUB_OPTIONS.SIZE.RATIO=-12:innerWidth<=540?SUB_OPTIONS.SIZE.RATIO=-3:innerWidth<=820?SUB_OPTIONS.SIZE.RATIO=15:innerWidth<=1024?SUB_OPTIONS.SIZE.RATIO=5:innerWidth<=1280?SUB_OPTIONS.SIZE.RATIO=6:SUB_OPTIONS.SIZE.RATIO=5});this.logger=new Logger(this.constructor.name),this.logger.dir("constructor").debug("dev",this._dev),this.logger.dir("constructor").debug("run mode",this._runMode),this.logger.dir("constructor").log("setup game core..."),window.addEventListener("click",this.handleNewGame.bind(this)),this.createNewGameButton()}initialCommitQuestInQueue(){for(;this.questQueue.length>0;){const quest=this.questQueue.pop();quest&&this.questManager.addQuest(quest)}}showHint(){this.scoreCalculator.hint>0&&(this.scoreCalculator.showHint(),this.blockManager.getHint(),setTimeout(()=>{this.blockManager.map.flat(1).forEach(cell=>cell.isHint=!1)},3e3)),this.scoreCalculator.hint===0&&document.querySelectorAll("#hintingGame").forEach(el=>el.disabled=!0)}async refreshGame(){this.gameEnd=!1,this.pointer.gameEnd=!1;const score=this.scoreCalculator.scores,turn=this.scoreCalculator.turn,combo=this.scoreCalculator.combo,quests=this.questManager.quests.map(q=>{const qst=Quest.createQuest({title:q.title,content:q.content,score:q.result.score,turn:q.result.turn,type:q.condition.type,amount:q.condition.amount});return qst.currentAmount=q.currentAmount,qst}),map=await this.blockManager.initialize();this.mapGenerator.initialize(map),this.blockManager.resetScore(),this.blockManager.resetQuest(),this.scoreCalculator.scores=score,this.scoreCalculator.turn=turn,this.scoreCalculator.combo=combo,this.questManager.quests=quests,setTimeout(()=>{this.execInitialPang()},16)}resetScore(){this.scoreCalculator.resetCombos(),this.scoreCalculator.resetScores(),this.scoreCalculator.resetTurns(),this.scoreCalculator.resetHints()}resetQuest(){this.questManager.resetQuest()}async newGame(){this.gameEnd=!1,this.pointer.gameEnd=!1;const map=await this.blockManager.initialize();this.mapGenerator.initialize(map),this.resetScore(),this.resetQuest(),this.autoQuests(),this.blockManager.animalsPang={cat:0,dog:0,lion:0,duck:0,mouse:0,rabbit:0,panda:0,pig:0,racoon:0},document.querySelectorAll("#hintingGame").forEach(el=>el.disabled=!1),setTimeout(()=>{this.execInitialPang()},16)}stopRender(){cancelAnimationFrame(this._animation)}createNewGameButton(){const wrap=document.createElement("div");wrap.id="btnWrap";const button=document.createElement("button");button.id="restartGame",button.innerText="✨ 새로운 게임";const button3=document.createElement("button");button3.id="hintingGame",button3.innerText="🔎 힌트",wrap.append(button3,button),document.body.append(wrap)}async handleNewGame(e){const target=e.target;target&&target.id.match(/^(newGame|restartGame)/)?(await this.newGame(),window.removeEventListener("click",this.handleNewGame.bind(this)),wait.splice(0),setTimeout(()=>{document.querySelectorAll("#modal").forEach(modal=>modal.remove())},10)):target&&target.id==="refreshGame"?await this.refreshGame():target&&target.id==="hintingGame"?this.showHint():target&&target.id==="modal-close"&&document.querySelectorAll("#modal").forEach(modal=>modal.remove())}setOption(property,value){if(`_${property}`in this)this.logger.dir("setOption").log(`success set option, property: ${property}, value: ${value}`),this[`_${property}`]=value;else throw new Error(`${property} is not a valid property`)}async initialize(){this.logger.dir("initialize").log("initialize"),this.loadModules(),this.setupCanvas(bgCanvas,gameCanvas,effectCanvas,scoreCanvas,selectCanvas,questCanvas),this.injection();const map=await this.blockManager.initialize();return this.mapGenerator.initialize(map),!0}autoQuests(){this.questManager.autoQuests()}loadModules(){this.logger.dir("loadModules").log("start..."),this.scoreCalculator=new ScoreCalculator(this.mode),this.questManager=new QuestManager(this.mode),this.blockManager=new BlockManager(this.mode,this.scoreCalculator,this.questManager),this.questManager.animalsPang=this.blockManager.animalsPang,this.animator=new Animator(this.mode),this.mapGenerator=new MapGenerator(this.mode),this.pointer=new Pointer(this.mode),this.storeManager=new StoreManager(this.mode,this._storeName),this.logger.dir("loadModules").log("success!")}setupCanvas(...canvases){this.canvases=canvases,this.logger.dir("setupCanvas").log("setup canvas elements");for(const canvas of canvases)this.logger.dir("setupCanvas").log(`add ${canvas.id} canvas`),ROOT.append(canvas);this.handleResizeCanvasSize(),this.logger.dir("setupCanvas").log("add event window resize detect"),window.addEventListener("resize",this.handleResizeCanvasSize.bind(this))}injection(){this.pointer.inject(this.blockManager),this.pointer.inject(this.mapGenerator),this.pointer.inject(this.scoreCalculator),this.questManager.inject(this.blockManager),this.questManager.inject(this.scoreCalculator)}animation(time){this.clearRect(),time*=.001,wait.length===0&&!this.gameEnd&&this.scoreCalculator.turn===0&&(wait.push(0),this.gameEnd=!0,this.pointer.gameEnd=!0,this.scoreCalculator.popupEndModal()),Math.floor(time),this.seek,this.scoreCalculator.render(),this.mapGenerator.render(),this.blockManager.render(),this.questManager.render(),bgCtx.restore(),scoreCtx.restore(),gameCtx.restore(),selectCtx.restore(),effectCtx.restore(),questCtx.restore(),this._animation=requestAnimationFrame(this.animation.bind(this)),this.seek=Math.floor(time)}clearRect(){bgCtx.clearRect(0,0,innerWidth,innerHeight),scoreCtx.clearRect(0,0,innerWidth,innerHeight),gameCtx.clearRect(0,0,innerWidth,innerHeight),effectCtx.clearRect(0,0,innerWidth,innerHeight),selectCtx.clearRect(0,0,innerWidth,innerHeight),questCtx.clearRect(0,0,innerWidth,innerHeight),bgCtx.save(),scoreCtx.save(),gameCtx.save(),effectCtx.save(),selectCtx.save(),questCtx.save()}render(){this.logger.dir("render").log("start game core rendering..."),this.logger.dir("render").log("start calulator rendering..."),this.logger.dir("render").log("start game map rendering..."),this.logger.dir("render").log("start block rendering..."),setTimeout(()=>{this.execInitialPang()},500),this._animation=requestAnimationFrame(this.animation.bind(this))}execInitialPang(){wait.splice(0),this.mode!=="test"&&wait.length===0&&(wait.push(0),this.blockManager.autoPangAndFill().then(()=>{wait.pop()}))}renderPerSecond(){}}const gameCore=new GameCore;gameCore.setOption("dev",MODE);gameCore.setOption("runMode",RUN_MODE);gameCore.setOption("storeName",STORE_NAME);gameCore.initialize().then(()=>{gameCore.autoQuests(),gameCore.render()}); diff --git a/assets/lion-pad-80d5ded3.png b/assets/lion-pad-80d5ded3.png new file mode 100644 index 0000000..624d8e9 Binary files /dev/null and b/assets/lion-pad-80d5ded3.png differ diff --git a/assets/mouse-pad-7221a183.png b/assets/mouse-pad-7221a183.png new file mode 100644 index 0000000..85819a7 Binary files /dev/null and b/assets/mouse-pad-7221a183.png differ diff --git a/assets/rabbit-pad-58c9a6de.png b/assets/rabbit-pad-58c9a6de.png new file mode 100644 index 0000000..d7ec309 Binary files /dev/null and b/assets/rabbit-pad-58c9a6de.png differ diff --git a/favicon/android-chrome-192x192.png b/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..0e211d7 Binary files /dev/null and b/favicon/android-chrome-192x192.png differ diff --git a/favicon/android-chrome-512x512.png b/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..586aeee Binary files /dev/null and b/favicon/android-chrome-512x512.png differ diff --git a/favicon/apple-touch-icon.png b/favicon/apple-touch-icon.png new file mode 100644 index 0000000..e89f538 Binary files /dev/null and b/favicon/apple-touch-icon.png differ diff --git a/favicon/favicon-16x16.png b/favicon/favicon-16x16.png new file mode 100644 index 0000000..52f783b Binary files /dev/null and b/favicon/favicon-16x16.png differ diff --git a/favicon/favicon-32x32.png b/favicon/favicon-32x32.png new file mode 100644 index 0000000..1c6d79f Binary files /dev/null and b/favicon/favicon-32x32.png differ diff --git a/favicon/favicon.ico b/favicon/favicon.ico new file mode 100644 index 0000000..b9d41f2 Binary files /dev/null and b/favicon/favicon.ico differ diff --git a/favicon/site.webmanifest b/favicon/site.webmanifest new file mode 100644 index 0000000..45dc8a2 --- /dev/null +++ b/favicon/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..8f6f1dd --- /dev/null +++ b/index.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + DEVKIMSON::Animal Match Game + + + + +
+ + +