diff --git a/BlazorSolution/MiniGames/Client/ViewModel/Uno.cs b/BlazorSolution/MiniGames/Client/ViewModel/Uno.cs index 8aab470..697d850 100644 --- a/BlazorSolution/MiniGames/Client/ViewModel/Uno.cs +++ b/BlazorSolution/MiniGames/Client/ViewModel/Uno.cs @@ -1,4 +1,5 @@ -using System; +using MiniGames.Shared.Models; +using System; namespace MiniGames.Client.ViewModel { @@ -6,7 +7,13 @@ namespace MiniGames.Client.ViewModel { public bool IstAblageStabelFarbeGleichHand(string ablegeStapelKarte, string neueKarte) { - return true; + if (ablegeStapelKarte.Equals(neueKarte)) + { + return true; + } else + { + return false; + } } } } diff --git a/BlazorSolution/MiniGamesTests/UnoTest.cs b/BlazorSolution/MiniGamesTests/UnoTest.cs index e210d49..8f7ef96 100644 --- a/BlazorSolution/MiniGamesTests/UnoTest.cs +++ b/BlazorSolution/MiniGamesTests/UnoTest.cs @@ -14,6 +14,11 @@ namespace MiniGamesTests [Theory] [InlineData("rot", "rot", true)] + [InlineData("blau", "rot", false)] + [InlineData("rot", "blau", false)] + [InlineData("blau", "blau", true)] + [InlineData("gelb", "rot", false)] + [InlineData("gruen", "gruen", true)] private void IstAblageStabelFarbeGleichHandTest(string ablegeStapelKarte, string neueKarte, bool erwartet) { //arrange