winner = function(game) {
	// Check the params of the function
	check(game, Object);
	check(game.scorePlayer1, Number);
	check(game.scorePlayer2, Number);
	check(game.player1, String);
	check(game.player2, String);

	if (game.scorePlayer1 > game.scorePlayer2) {
		return game.player1;
	} else if (game.scorePlayer1 < game.scorePlayer2) {
		return game.player2;
	} else {
		return null;
	}
};

looser = function(game) {
	// Check the params of the function
	check(game, Object);
	check(game.scorePlayer1, Number);
	check(game.scorePlayer2, Number);
	check(game.player1, String);
	check(game.player2, String);

	if (game.scorePlayer1 < game.scorePlayer2) {
		return game.player1;
	} else if (game.scorePlayer1 > game.scorePlayer2) {
		return game.player2;
	} else {
		return null;
	}
};

pointBase = function(playerNbGames, currentPoints) {
	// Check the params of the function
	check(playerNbGames, Number);
	check(currentPoints, Number);

	if (playerNbGames < 30) {
		return 40;
	} else if (currentPoints <= 2400) {
		return 20;
	} else {
		return 10;
	}
};

pointsDifference = function(winnerPoints, looserPoints) {
	// Check the params of the function
	check(winnerPoints, Number);
	check(looserPoints, Number);

	var diff = Math.abs(winnerPoints - looserPoints);
	if (winnerPoints - looserPoints < 0) {
		if (diff > 400) {
			return -400;
		} else {
			return winnerPoints - looserPoints;
		}
	} else if (winnerPoints - looserPoints > 0) {
		if (diff > 400) {
			return 400;
		} else {
			return winnerPoints - looserPoints;
		}
	} else {
		return 0;
	}
};

kEqualForBothPlayers = function(kForWinner, kForLooser) {
	// Check the params of the function
	check(kForWinner, Number);
	check(kForLooser, Number);

	if (kForWinner === kForLooser) {
		return true;
	} else {
		return false;
	}
};

last10GamesPerf = function(playerPoints) {
	// Check the params of the function
	check(playerPoints, Array);
	var list = [];
	var first = 0;
	var end = 0;
	if (playerPoints.length > 9) {
		list = playerPoints.slice(-10);
		first = list[0];
		end = list[9];
		return end - first;
	} else {
		first = playerPoints[0];
		end = lodash.last(playerPoints);
		return end - first;
	}
};

last5Games = function(playerPoints) {
	// Check the params of the function
	check(playerPoints, Array);
	var list = [];
	if (playerPoints.length > 4) {
		list = playerPoints.slice(-5);
		return list;
	} else {
		return playerPoints;
	}
};

fullName = function(userProfile) {
	return userProfile.firstName + ' ' + userProfile.lastName.charAt(0) + '.';
};

@@ -1970,17 +1970,18 @@
 ength %3E 
-9
+10
 ) %7B%0A%09%09li
@@ -2006,17 +2006,17 @@
 slice(-1
-0
+1
 );%0A%09%09fir
@@ -2046,9 +2046,10 @@
 ist%5B
-9
+10
 %5D;%0A%09

Update last10GamesPerf to take also the initial score of the player in count