Commit a4698866 authored by quentin.vrel's avatar quentin.vrel
parents dd77cb9f 16e90e0d
//import Tile from '@/model/Tile.js'
import Tile from '../model/Tile.js'
const COMBINATION_NAME = {
"0": "Chow",
"1": "Pung",
"2": "Kong"
};
//export default
class Combination {
constructor(tiles) {
this.tiles = tiles;
}
getCombinationName(tiles){
return 'pouet';
}
}
test = new Combination(1);
console.log(test);
\ No newline at end of file
import Tile from '@/model/Tile.js'
const COMBINATION_NAME = {
"0": "Chow",
"1": "Pung",
"2": "Kong"
};
export default class Hand{
constructor() {
this.tiles_left = [];
......@@ -14,4 +20,10 @@ export default class Hand{
draw(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