Commit 1242cb7a authored by quentin.vrel's avatar quentin.vrel

kong typo

parent 39f775cf
...@@ -66,7 +66,7 @@ export default class Hand{ ...@@ -66,7 +66,7 @@ export default class Hand{
* Check if 4 tiles are the same * Check if 4 tiles are the same
*/ */
checkKong(){ checkKong(){
let pungArray=[]; let kongArray=[];
const tile_ids = this.tiles_left.map(tile => tile.id_tuile); const tile_ids = this.tiles_left.map(tile => tile.id_tuile);
let ids_set = new Set(tile_ids); let ids_set = new Set(tile_ids);
ids_set.forEach(unique_tile => { ids_set.forEach(unique_tile => {
...@@ -74,9 +74,9 @@ export default class Hand{ ...@@ -74,9 +74,9 @@ export default class Hand{
return n + (val === unique_tile); return n + (val === unique_tile);
}, 0); }, 0);
if(count>=4){ if(count>=4){
pungArray.push(unique_tile); kongArray.push(unique_tile);
} }
}); });
return pungArray; return kongArray;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment