18 lines
326 B
JavaScript
18 lines
326 B
JavaScript
class Player {
|
|
constructor(sign, id) {
|
|
this.id = id;
|
|
this.sign = sign;
|
|
this.clicks = [];
|
|
this.score = 0;
|
|
this.combinations = [];
|
|
this.positions = []
|
|
}
|
|
setPosition() {
|
|
this.positions = this.clicks.join(",").split(",");
|
|
}
|
|
sortClicks() {
|
|
this.clicks.sort();
|
|
}
|
|
|
|
}
|
|
export default Player; |