fix: allow for empty lines in Fens.txt file
This commit is contained in:
parent
d4dd023852
commit
3863675e6a
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ using ChessChallenge.Example;
|
||||||
using Raylib_cs;
|
using Raylib_cs;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.ExceptionServices;
|
using System.Runtime.ExceptionServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -66,7 +67,7 @@ namespace ChessChallenge.Application
|
||||||
|
|
||||||
BotStatsA = new BotMatchStats("IBot");
|
BotStatsA = new BotMatchStats("IBot");
|
||||||
BotStatsB = new BotMatchStats("IBot");
|
BotStatsB = new BotMatchStats("IBot");
|
||||||
botMatchStartFens = FileHelper.ReadResourceFile("Fens.txt").Split('\n');
|
botMatchStartFens = FileHelper.ReadResourceFile("Fens.txt").Split('\n').Where(fen => fen.Length > 0).ToArray();
|
||||||
botTaskWaitHandle = new AutoResetEvent(false);
|
botTaskWaitHandle = new AutoResetEvent(false);
|
||||||
|
|
||||||
StartNewGame(PlayerType.Human, PlayerType.MyBot);
|
StartNewGame(PlayerType.Human, PlayerType.MyBot);
|
||||||
|
@ -448,4 +449,4 @@ namespace ChessChallenge.Application
|
||||||
boardUI.Release();
|
boardUI.Release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue