Source

RockPaperScissors / RockPaperScissors / RockPaperScissors.cs

Diff from to

RockPaperScissors/RockPaperScissors.cs

 {
   public class RockPaperScissors
   {
-    public Player Play( string player1Move, string player2Move )
+    public Player Play( Move player1Move, Move player2Move )
     {
       switch ( player1Move )
       {
-        case "R":
-          if ( player2Move == "S" ) return Player.First;
-          else if ( player2Move == "R" ) return Player.Draw;
+        case Move.Rock:
+          if ( player2Move == Move.Scissors ) return Player.First;
+          else if ( player2Move == Move.Rock ) return Player.Draw;
           else return Player.Second;
-        case "S":
-          if ( player2Move == "P" ) return Player.First;
-          else if ( player2Move == "S" ) return Player.Draw;
+        case Move.Scissors:
+          if ( player2Move == Move.Paper ) return Player.First;
+          else if ( player2Move == Move.Scissors ) return Player.Draw;
           else return Player.Second;
-        case "P":
-          if ( player2Move == "R" ) return Player.First;
-          else if ( player2Move == "P" ) return Player.Draw;
+        case Move.Paper:
+          if ( player2Move == Move.Rock ) return Player.First;
+          else if ( player2Move == Move.Paper ) return Player.Draw;
           else return Player.Second;
         default:
           throw new NotSupportedException( "No matches" );