Commit 94fbe01d authored by Zohten's avatar Zohten

sort

parent d3f66ac6
...@@ -14,4 +14,10 @@ export default class Hand{ ...@@ -14,4 +14,10 @@ export default class Hand{
draw(tile){ draw(tile){
this.tiles_left.push(tile); this.tiles_left.push(tile);
} }
sort(){
this.tiles_left.sort(function (a, b) {
return a.id - b.id;
});
}
} }
\ 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