Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (direction == "left" && mazearray[xIndex - 1, yIndex].canPass == false && x <= (xIndex * 18) + 3)
- {
- System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\vroy\Desktop\LOG.txt");
- file.WriteLine("ENTERING LEFT");
- file.WriteLine(x + " , " + y);
- if (PacMan.yIndex > yIndex)
- {
- file.WriteLine("yIndex more");
- }
- if (PacMan.yIndex < yIndex)
- {
- file.WriteLine("yIndex less");
- }
- if (PacMan.xIndex == xIndex)
- {
- file.WriteLine("xIndex same");
- }
- file.WriteLine("METHOD CALL ENDED");
- if (PacMan.yIndex > yIndex && mazearray[xIndex, yIndex + 1].canPass == true)
- {
- direction = "down";
- Console.WriteLine("CHOICE DOWN");
- return;
- }
- if (PacMan.yIndex < yIndex && mazearray[xIndex, yIndex].canPass == true && y <= (yIndex * 18) + 3)
- {
- file.WriteLine("ENTERING UP");
- direction = "up";
- return;
- }
- if (PacMan.xIndex == xIndex)
- {
- if (mazearray[xIndex, yIndex + 1].canPass == true)
- {
- direction = "down";
- }
- else
- {
- direction = "up";
- }
- }
- file.Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement