2223242526272829303132
System.out.print("Enter direction (u,d,l,r): "); // Read the char Scanner s = new Scanner(System.in); String str = s.nextLine(); int moved = pf.moveByString(str); if(moved>0) pf.insertRandCell(); System.out.println(pf); } } }