import Tile from '@/model/Tile.js'

const COMBINATION_NAME = {
    "0": "Chow",
    "1": "Pung",
    "2": "Kong"
    };

export default class Hand{
    constructor() {
        this.tiles_left = [];
        this.claimed =[];
    }

    discard(pos){
        var discarded_tile = this.tiles_left.splice(pos, 1);
        return discarded_tile;
    }

    draw(tile){
        this.tiles_left.push(tile);
    }

    sort(){
        this.tiles_left.sort(function (a, b) {
            return a.id - b.id;
          });
    }
}