Fixed the file import bug where every tile was empty
This commit is contained in:
+2
-4
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user