Skip to content

Commit

Permalink
removed try/catch for deprecated game board in gameserializer
Browse files Browse the repository at this point in the history
  • Loading branch information
brine authored and kellyelton committed Dec 2, 2020
1 parent 90d9a8f commit 248fca9
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions octgnFX/Octgn.DataNew/GameSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,12 @@ public object Deserialize(string fileName)
#region gameBoards
if (g.gameboards == null)
{
try
{
// if the game doesn't have the gameboards element, check for the default board in the table property
// DEPRECATED CODE FOR OLD TABLE-DEFINED GAMEBOARD
var boardPath = AbsolutePath(root_dir, g.table.board);

var boardPath = AbsolutePath(root_dir, g.table.board);

var position = g.table.boardPosition?.Split(',');
var position = g.table.boardPosition?.Split(',');
if (boardPath != null && position != null)
{
var defBoard = new GameBoard
{
Name = "Default",
Expand All @@ -134,10 +133,6 @@ public object Deserialize(string fileName)
};
ret.GameBoards.Add("", defBoard);
}
catch
{
// ignores this game board instead of invalidating the entire game definition
}
}
else
{
Expand Down

0 comments on commit 248fca9

Please sign in to comment.