Пример #1
0
 public static GameAction Parse(string s)
 {
     if (s.StartsWith("Start new game"))
     {
         return(StartNewGameAction.Parse(s));
     }
     if (s.StartsWith("Play card"))
     {
         return(PlayCardAction.Parse(s));
     }
     if (s.StartsWith("Drop card"))
     {
         return(DropCardAction.Parse(s));
     }
     if (s.StartsWith("Tell"))
     {
         return(TellCardPropertyAction.Parse(s));
     }
     return(null);
 }
Пример #2
0
 private void StartNewGame(StartNewGameAction action)
 {
     ResetGame();
     InitDeck(action.Deck);
     InitPlayers();
 }