public void PacManMove() { ConsoleLib.Coord temp = PacMan.DirectionalCheck(); Thread.Sleep(100); if (Console.KeyAvailable == true) { PacMan.Move(Map); } else if (Map.GetPointInMap(temp.y, temp.x) != 1) { PacMan.DeleteDraw(Map); PacMan.SetCoordMonster(temp); PacMan.Draw(Map); } }
public bool WinCheck() { bool win = true; for (int i = 0; i < Map.SizeY; i++) { for (int j = 0; j < Map.SizeX; j++) { if (Map.GetPointInMap(i, j) == 2) { win = false; break; } } if (!win) { break; } } return(win); }