Commit 17c085eb authored by Zohten's avatar Zohten

renamed

parent 2692556e
......@@ -41,9 +41,15 @@ export default class Hand{
pungArray=[];
const tile_ids = this.tiles_left.map(tile => tile.id_tuile);
ids_set = new Set(tile_ids);
ids_set.forEach(tile => {
ids_set.forEach(unique_tile => {
var count = tile_ids.reduce(function(n, val) {
return n + (val === unique_tile);
}, 0);
if(count>=3){
pungArray.push(unique_tile);
}
})
return pungArray;
}
/**
......
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