Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use nested for loops to loop through the blocked array. The outer index variable is the row, the inner index variable is the column. Read
Use nested for loops to loop through the blocked array. The outer index variable is the row, the inner index variable is the column.
Read the file one character at a time using the next function not nextline
Read in the
If the character is a set the corresponding location in the blocked array to true.
If the character is a set the corresponding location in the blocked array to false;
If the character is an set the location of the start and player, since the player starts at the starting location.
If the character is a G set the location of the goal.
This would be a great place to use a switch statement, although you are not required to
The tests for both constructors should pass now.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started