-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.js
46 lines (42 loc) · 982 Bytes
/
player.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
console.log('uploading player.js');
function Player(playerId){
this.id = playerId;
this.name = "";
this.avalible = true;
this.complete = 0;
this.wins = 0;
this.losses = 0;
this.isWinner = false;
this.gameId = 0;
};
Player.prototype.setName = function(name){
this.name = name;
};
Player.prototype.setWins = function(wins){
this.wins = wins;
};
Player.prototype.setLosses = function(losses){
this.losses = losses;
};
Player.prototype.setAvalible = function(bool) {
this.avalible = bool;
};
Player.prototype.setComplete = function(complete){
return this.complete;
};
Player.prototype.setGameId = function(gameID) {
this.gameID = gameID;
};
Player.prototype.getName = function(){
return this.name;
};
Player.prototype.getWins = function(){
return this.wins;
};
Player.prototype.getLosses = function(){
return this.losses;
};
Player.prototype.getComplete = function(){
return this.complete;
};
module.exports = Player;