Merge pull request #50 from H4CK3R-01/remove-undefined

Remove undefined Playernames from Scoreboard
This commit is contained in:
gohlkeMax 2021-07-01 19:24:35 +02:00 committed by GitHub
commit 3b49895f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,10 +178,10 @@ function start_game() {
score_button.defaultCursor = 'pointer'; score_button.defaultCursor = 'pointer';
score_button.on('pointerdown', function () { score_button.on('pointerdown', function () {
card = new Card(game_board_size, "", card = new Card(game_board_size, "",
{ "text": playerNames[0] + ": " + positions[0], "status": false }, { "text": playerNames[0]? playerNames[0] + ": " + positions[0] : ("Kein Spieler"), "status": false },
{ "text": playerNames[1] + ": " + positions[1], "status": false }, { "text": playerNames[1]? playerNames[1] + ": " + positions[1] : ("Kein Spieler"), "status": false },
{ "text": playerNames[2] + ": " + positions[2], "status": false }, { "text": playerNames[2]? playerNames[2] + ": " + positions[2] : ("Kein Spieler"), "status": false },
{ "text": playerNames[3] + ": " + positions[3], "status": false }, 0, false); { "text": playerNames[3]? playerNames[3] + ": " + positions[3] : ("Kein Spieler"), "status": false }, 0, false);
card.showCard(); card.showCard();
show_card = true; show_card = true;
}); });