public bool Delete(string filePath) { if (Files.Contains(filePath) || ChessGameSerializer.ClearFile(_directory + filePath)) { Files.Remove(filePath); ChessGameSerializer.SaveInFile(_directory + _repositorySaveFilePath, Files); return(true); } return(false); }
public void Save(string filePath, ChessGameState state) { ChessGameSerializer.SaveInFile(_directory + filePath, state); Files.Add(filePath); ChessGameSerializer.SaveInFile(_directory + _repositorySaveFilePath, Files); }