From 788f8dc1916ca9e185b7bb27daf78071bc711c63 Mon Sep 17 00:00:00 2001 From: Nicolas Fritz Date: Wed, 18 Jan 2023 20:01:40 +0100 Subject: [PATCH] refactoring: SpecialKarten CodeFormatierung und Kommentierung - Skip - ChooseColor - Reverse --- uno/js/cards/special/ChooseColor.js | 9 +++++++++ uno/js/cards/special/Reverse.js | 10 ++++++++++ uno/js/cards/special/Skip.js | 9 +++++++++ 3 files changed, 28 insertions(+) diff --git a/uno/js/cards/special/ChooseColor.js b/uno/js/cards/special/ChooseColor.js index 591a776..f351c23 100644 --- a/uno/js/cards/special/ChooseColor.js +++ b/uno/js/cards/special/ChooseColor.js @@ -1,10 +1,19 @@ +//Imports const Card = require('../Card'); const uno = require('../../uno'); +//Klasse ChooseColor für FarbWahlKarten class ChooseColor extends Card { + + //Konstruktor für das Erstellen einer ChooseColor-Karte constructor(name) { + + //An Konstruktor von Cards weitergeben super(name, uno.CARD_COLORS[0]); + } + } +//Exportiert Modul ChooseColor module.exports = ChooseColor; \ No newline at end of file diff --git a/uno/js/cards/special/Reverse.js b/uno/js/cards/special/Reverse.js index dd9ceb7..1245ade 100644 --- a/uno/js/cards/special/Reverse.js +++ b/uno/js/cards/special/Reverse.js @@ -1,8 +1,18 @@ +//Imports const Card = require('../Card'); +//Klasse Reverse für Karten, die die Spielrichtung ändern class Reverse extends Card { + + //Konstruktor für das Erstellen einer Reverse-Karte constructor(name, color) { + + //An Konstruktor von Cards weitergeben super(name, color); + } + } + +//Exportiert Modul Reverse module.exports = Reverse; \ No newline at end of file diff --git a/uno/js/cards/special/Skip.js b/uno/js/cards/special/Skip.js index 1e80281..69e3102 100644 --- a/uno/js/cards/special/Skip.js +++ b/uno/js/cards/special/Skip.js @@ -1,9 +1,18 @@ +//Imports const Card = require('../Card'); +//Klasse Skip für Karten, die den nächsten Spieler überspringen class Skip extends Card { + + //Konstruktor für das Erstellen einer Skip-Karte constructor(name, color) { + + //An Konstruktor von Cards weitergeben super(name, color); + } + } +//Exportiert Modul Skip module.exports = Skip; \ No newline at end of file