Maze Game - Version 2! In the real world You need a method called checkValidPosition. It should
Question:
Maze Game - Version 2! In the "real world" You need a method called checkValidPosition. It should take in as parameters the current 2D array and two ints - one that represents the new X position and one that represents the new Y position of the Player. It should determine if the new position is valid (within the bounds of the array), and return a boolean TRUE or FALSE to the Main method. This function should be used to replace the code that was previously used to do this work in your code from Assignment 5B. You need a method called checkGameStatus. It should take in as parameters the current 2D array and two ints that represent the X/Y position of the player. It should determine if the player is on the path or has won or lost the game. It should return an integer to the Main method that represents each state: Returning 0 means the player has lost Returning 1 means the player is still playing the game Returning 2 means the player has won the game. This function should be used to replace the code that was previously used to do this work in your code from Assignment 5B. You need a method called printMaze. It should take in as parameters the current 2D array. It should print the maze to the screen; it should not return any value to the Main method.