[Fact]
public void SaveAndLoadGame()
{
var fileName = "TestGomoku.csv";
var field = InitAGame();
var fieldSaved = (int[,])field.Clone();
Gomoku.SaveGame(field, fileName);
var csvImport = new CsvImport<SavedGame>();
var csvExported = csvImport.Read(fileName);
csvExported.Should().HaveCount(Gomoku.GetStoneCount(field));
field.Should().BeEquivalentTo(fieldSaved, "save must not change field");
Gomoku.LoadGame(15, fileName).Should().BeEquivalentTo(field);
}
[Fact]
public void SaveAndLoadGame()
{
var fileName = "TestGomoku.csv";
var field = InitAGame();
var fieldSaved = (int[,])field.Clone();
Gomoku.SaveGame(field, fileName);
var csvImport = new CsvImport<SavedGame>();
var csvExported = csvImport.Read(fileName);
csvExported.Should().HaveCount(Gomoku.GetStoneCount(field));
field.Should().BeEquivalentTo(fieldSaved, "save must not change field");
Gomoku.LoadGame(15, fileName).Should().BeEquivalentTo(field);
}