Skip to content

Commit

Permalink
output fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxiao95 committed Jan 31, 2019
1 parent 7c29a68 commit f72e5ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/hongxiao/HuaRongDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ public void outSteps(Qipan state, int depth){
}
System.out.println(depth);
now.output();
glscanner.nextLine();
}

public static Scanner glscanner = new Scanner(System.in);

public static int[][] stringToStates(String desc){
if(desc.length() != ROW*COL){return null;}
String[] persons = desc.split("");
Expand Down Expand Up @@ -205,7 +208,7 @@ public void go(){
personShape.put(name2Value.get("黄"), V_SHAPE);
personShape.put(name2Value.get("赵"), V_SHAPE);
System.out.println("请连续输入棋盘配置,人物用单字表示,空格用空表示,如张曹槽马空");
String model = scanner.nextLine().trim().replace("空","〇");
String model = scanner.nextLine().trim().replace("空","〇").replace(" ","");
System.out.println("卒默认为单点,曹操默认2x2");
String hPersons[] = model.split("");
for(int i = 1; i < hPersons.length; i++){
Expand Down

0 comments on commit f72e5ce

Please sign in to comment.