Fix automatic reveal on restart

This commit is contained in:
Marvin Rohrbach
2018-12-15 16:39:12 +01:00
parent 07eeec1032
commit 624f6d1ea6
2 changed files with 14 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ namespace CoopSweeper
StartNewGame(game, cursorPosX, cursorPosY);
};
ConsoleKey key = (ConsoleKey)(-1);
do
while ((key = Console.ReadKey().Key) != ConsoleKey.Escape)
{
var oldCursorPosX = cursorPosX;
var oldCursorPosY = cursorPosY;
@@ -70,7 +70,7 @@ namespace CoopSweeper
}
Console.SetCursorPosition(0, 0);
Console.CursorVisible = false;
} while ((key = Console.ReadKey().Key) != ConsoleKey.Escape);
}
}
private static void DrawChar(IField f, bool isCursor)