Ajout d'une correction possible
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace MiniJeuxFinal.Games.PierrePapierCiseaux.Actions
|
||||
{
|
||||
public interface IActionPpc : IAction
|
||||
{
|
||||
bool ToWin(IActionPpc other);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace MiniJeuxFinal.Games.PierrePapierCiseaux.Actions
|
||||
{
|
||||
public class PaperAction : IActionPpc
|
||||
{
|
||||
public string Name => "Papier";
|
||||
|
||||
public bool ToWin(IActionPpc other)
|
||||
{
|
||||
return other is not ScissorsAction;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace MiniJeuxFinal.Games.PierrePapierCiseaux.Actions
|
||||
{
|
||||
public class ScissorsAction : IActionPpc
|
||||
{
|
||||
public string Name => "Ciseaux";
|
||||
|
||||
public bool ToWin(IActionPpc other)
|
||||
{
|
||||
return other is not StoneAction;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace MiniJeuxFinal.Games.PierrePapierCiseaux.Actions
|
||||
{
|
||||
public class StoneAction : IActionPpc
|
||||
{
|
||||
public string Name => "Pierre";
|
||||
|
||||
public bool ToWin(IActionPpc other)
|
||||
{
|
||||
return other is not PaperAction;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user