public static OperationResult <GameState> ToGameState(GameStateResource gameStateResource) { var gameState = new GameState(); gameState.InjectFrom(gameStateResource); return(OperationResult <GameState> .Ok(gameState)); }
public static OperationResult <GameStateResource> ToGameStateResource(GameState gameState) { var gameStateResource = new GameStateResource(); gameStateResource.InjectFrom(gameState); gameStateResource.FEN = gameState.ToString(); return(OperationResult <GameStateResource> .Ok(gameStateResource)); }