From f1df4162a36afe6f60f21704718173d2fb828782 Mon Sep 17 00:00:00 2001 From: maxluli Date: Thu, 13 Oct 2022 10:10:17 +0200 Subject: [PATCH] Fixed the file import bug where every tile was empty --- NonoGramme/Grid.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NonoGramme/Grid.cs b/NonoGramme/Grid.cs index 108e897..6e5facd 100644 --- a/NonoGramme/Grid.cs +++ b/NonoGramme/Grid.cs @@ -127,8 +127,6 @@ namespace NonoGramme rawData = matches[0].Groups[1].Value; } - - //MessageBox.Show(rawData); if (rawData.Length != size.Width * size.Height) MessageBox.Show("The file contains conflicting datas"); @@ -149,7 +147,7 @@ namespace NonoGramme Tile.State tileState = Tile.State.Empty; int flatIndex = y * GridSize.Width + x; - if (rawData[flatIndex] == 1) + if (rawData[flatIndex] == '1') { tileState = Tile.State.Undiscovered; } @@ -158,7 +156,7 @@ namespace NonoGramme } } - MessageBox.Show("File imported Successfully"); + //MessageBox.Show("File imported Successfully"); } private void Populate() {