Browse Source

IstAblageStabelFarbeGleichHand checkt ob aktuelle Karte gleich neue Karte

feature/uno
ADato88 3 years ago
parent
commit
ebd3067742
  1. 9
      BlazorSolution/MiniGames/Client/ViewModel/Uno.cs
  2. 5
      BlazorSolution/MiniGamesTests/UnoTest.cs

9
BlazorSolution/MiniGames/Client/ViewModel/Uno.cs

@ -1,12 +1,19 @@
using System;
using MiniGames.Shared.Models;
using System;
namespace MiniGames.Client.ViewModel
{
public class Uno
{
public bool IstAblageStabelFarbeGleichHand(string ablegeStapelKarte, string neueKarte)
{
if (ablegeStapelKarte.Equals(neueKarte))
{
return true;
} else
{
return false;
}
}
}
}

5
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

Loading…
Cancel
Save