3 Commits
Author SHA1 Message Date
didier amyot 8651ede879 added extra function 2023-12-15 20:04:32 -05:00
didier amyot 7edf62204e fixed bug 2023-12-15 18:03:26 -05:00
didier amyot 1e7c3b5fbf added documentation 2023-12-15 09:20:58 -05:00
2 changed files with 17 additions and 1 deletions

No files matched your search

+8 -1
View File
@@ -130,6 +130,13 @@ export class HockeyPlayerStatistics {
this.dateOfBirth = dateOfBirth;
}
/**
* Returns the current age of the player in years.
*/
currentAge(){
return new HockeyPlayer(this.firstName, this.lastName, this.dateOfBirth).currentAge();
}
/**
* Set the total number the player has played
@@ -169,7 +176,7 @@ export class HockeyPlayerStatistics {
* Set the total number of goal scored by the player
* @param {number} goals
*/
setNumberOfGoals(goals){
setNumberOfGoals(numberOfGoals){
this.numberOfGoals = numberOfGoals
}
+9
View File
@@ -13,10 +13,19 @@ export class Point{
this.#x = x;
this.#y = y;
}
/**
* Retoure la coordonée X du point.
* @returns {number}
*/
getX(){
return this.#x;
}
/**
* Retoure la coordonée Y du point.
* @returns {number}
*/
getY(){
return this.#y;
}