private void readButton_Click(object sender, RoutedEventArgs e)
{
this.gameProvider = new GameProvider(this.gameProvider.Allocator);
this.chessboardControl.SetupGameProvider(this.gameProvider);
this.redoMoves = new List<MoveWithDecision>();
string path = Directory.GetCurrentDirectory() +
System.IO.Path.DirectorySeparatorChar + "chess.game";
string[] lines = System.IO.File.ReadAllLines(path);
Queem.Core.Color color = Queem.Core.Color.White;
foreach (var line in lines)
{
var move = new Move(line);
if (this.gameProvider.PlayerBoards[(int)color].Figures[(int)move.From] == Queem.Core.Figure.King)
if (Math.Abs((int)move.From - (int)move.To) == 2)
move.Type = MoveType.KingCastle;
this.gameProvider.ProcessMove(move, color);
color = (Queem.Core.Color)(1 - (int)color);
}
this.chessboardControl.RedrawAll();
}