Skip to content

Commit 4000749

Browse files
committed
Correct anmial.txt
1 parent b5e2b7b commit 4000749

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

李逢双/data/animal.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
608000a0g
2-
0200000d0
3-
003000e00
1+
608000107
2+
020000040
3+
003000500
44
000000000
5-
005000c00
6-
0400000b0
7-
701000h0f
5+
005000300
6+
040000020
7+
701000806

李逢双/src/controller/GameController.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ public static void startGame() {
3939
} else {
4040
System.out.print("右方玩家行动: ");
4141
}
42-
43-
System.out.println(input);
44-
commands.add(input);
42+
String input = scanner.nextLine();
4543
Matcher matcher = animalMovePattern.matcher(input);
4644
if (input.equals("exit")) {
4745
break;

李逢双/李逢双.iml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>

0 commit comments

Comments
 (0)