Continous Integration in der Praxis Gruppenarbeit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
789 B

using MiniGames.Shared.Models;
using System;
namespace MiniGames.Client.ViewModel
{
public class SchereSteinPapierEchseSpock
{
SchereSteinPapierEchseSpockModel RegelModel = new();
public string SpielerStein(string spielerHand, string gegnerHand)
{
if(spielerHand.Equals(RegelModel.hand[0]) && (gegnerHand.Equals(RegelModel.hand[1]) || gegnerHand.Equals(RegelModel.hand[3])))
{
return RegelModel.erg[0];
} else if(spielerHand.Equals(RegelModel.hand[0]) && (gegnerHand.Equals(RegelModel.hand[2]) || gegnerHand.Equals(RegelModel.hand[4])))
{
return RegelModel.erg[1];
} else
{
return RegelModel.erg[2];
}
}
}
}