2019-03-06 12:11:43 +01:00
|
|
|
class Player
|
|
|
|
{
|
|
|
|
constructor(name, color)
|
|
|
|
{
|
|
|
|
this.name = name;
|
|
|
|
this.color = color;
|
2019-03-07 17:51:19 +01:00
|
|
|
this.id = name;
|
2019-03-06 12:11:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
set_name(name)
|
|
|
|
{
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
set_color(color)
|
|
|
|
{
|
|
|
|
this.color = color;
|
|
|
|
}
|
|
|
|
|
|
|
|
get_name()
|
|
|
|
{
|
2019-03-07 17:51:19 +01:00
|
|
|
return this.name;
|
|
|
|
}
|
|
|
|
|
|
|
|
get_id()
|
|
|
|
{
|
|
|
|
return this.id;
|
2019-03-06 12:11:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
get_color()
|
|
|
|
{
|
|
|
|
return this.color;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|