小编Tod*_*dai的帖子

迷宫求解算法Java(递归)

我完全陷入了本周末的家庭作业.

由于一些愚蠢的原因,我的递归遍历在它到达我的迷宫('E')结束时并没有停止,而是继续前进.

这是读者:

public class mainProg {


    public static void main(String[] args) {
        // The name of the file to open.

        Scanner reader = new Scanner(System.in);  // Reading from System.in
        System.out.println("Enter the name of textfile to be read ( add .txt): ");
        String fileName = reader.next();
        char temp;
        // This will reference one line at a time
        String line = null;
        int count = 1;
        int heightCounter = 0;
        try {
            // FileReader reads text files in the default encoding. …
Run Code Online (Sandbox Code Playgroud)

java recursion maze

1
推荐指数
1
解决办法
1410
查看次数

标签 统计

java ×1

maze ×1

recursion ×1