/** * Class to provide input for maze program. * Walls are encoded as "#" * Start as "s" * Finish as "f" * Open space as " "; * @author kim * */ public class MazeValues { public int rows; public int cols; public String[] input; public String[] getInput(int selection) { switch (selection) { case 0 : rows = 10; cols = 20; input = new String[10]; input[0] = "####################"; input[1] = "#s# #f # #"; input[2] = "# ####### #### # # #"; input[3] = "# # # ### #"; input[4] = "##### ### # #"; input[5] = "# # # ####### ##"; input[6] = "# # # ### # # #"; input[7] = "# # # # # # ## #"; input[8] = "# # # # #"; input[9] = "####################"; break; case 1 : rows = 10; cols = 20; input = new String[10]; input[0] = "####################"; input[1] = "#s# #f # #"; input[2] = "# ####### ###### # #"; input[3] = "# # # ### #"; input[4] = "##### ### # #"; input[5] = "# # # ####### ##"; input[6] = "# # # ### # # #"; input[7] = "# # # # # # ## #"; input[8] = "# # # # #"; input[9] = "####################"; break; case 2 : rows = 10; cols = 18; input = new String[10]; input[0] = "##################"; input[1] = "# #s # #f#"; input[2] = "# ####### # #### #"; input[3] = "# # ## #"; input[4] = "# ### ##### # #"; input[5] = "# # # ######"; input[6] = "# # # ### # #"; input[7] = "# ### # # # ##"; input[8] = "# # # # #"; input[9] = "####################"; break; case 3 : rows = 10; cols = 18; input = new String[10]; input[0] = "##################"; input[1] = "#f#s # #"; input[2] = "# ######### #### #"; input[3] = "# # ## #"; input[4] = "# ### ##### # #"; input[5] = "# # # ######"; input[6] = "# # # ### # #"; input[7] = "# ### # # # ##"; input[8] = "# # # # #"; input[9] = "####################"; break; default : // Error - should never get here unless blew menu setup break; } return input; } public int getNumRows() { return rows; } public int getNumCols() { return cols; } }