Skip to content
This repository was archived by the owner on Sep 4, 2023. It is now read-only.

Commit bdbbef0

Browse files
committed
init
1 parent 6ac5d1c commit bdbbef0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2952
-12
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Lab_2_2021_2_(ZERG_CHESS)█████████/.idea/workspace.xml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Lab_2_2021_2_(ZERG_CHESS)█████████/src/logic/unit/FlyingUnit.java

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,29 @@ public FlyingUnit(int startColumn, int startRow, boolean isWhite, String name) {
99
}
1010

1111
public boolean move(int direction) {
12-
switch(direction) {
12+
switch (direction) {
1313
case 0:
14-
if (this.getRow() + 2 <= 4) {this.setRow(this.getRow() + 2); return true;}
15-
else return false;
14+
if (this.getRow() + 2 <= 4) {
15+
this.setRow(this.getRow() + 2);
16+
return true;
17+
} else return false;
1618
case 1:
17-
if (this.getColumn() + 2 <= 4) {this.setColumn(this.getColumn() + 2); return true;}
18-
else return false;
19+
if (this.getColumn() + 2 <= 4) {
20+
this.setColumn(this.getColumn() + 2);
21+
return true;
22+
} else return false;
1923
case 2:
20-
if (this.getRow() - 2 >= 0) {this.setRow(this.getRow() - 2); return true;}
21-
else return false;
24+
if (this.getRow() - 2 >= 0) {
25+
this.setRow(this.getRow() - 2);
26+
return true;
27+
} else return false;
2228
case 3:
23-
if (this.getColumn() - 2 >= 0) {this.setColumn(this.getColumn() - 2); return true;}
24-
else return false;
29+
if (this.getColumn() - 2 >= 0) {
30+
this.setColumn(this.getColumn() - 2);
31+
return true;
32+
} else return false;
2533
default:
2634
return false;
2735
}
2836
}
29-
30-
3137
}

Lab_2_To_student/.project

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+
<projectDescription>
3+
<name>Lab_2_To_student</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
</buildSpec>
9+
<natures>
10+
</natures>
11+
</projectDescription>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=14
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=14
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13+
org.eclipse.jdt.core.compiler.release=enabled
14+
org.eclipse.jdt.core.compiler.source=14
1.82 KB
Binary file not shown.
3.43 KB
Binary file not shown.
7.44 KB
Binary file not shown.
9.41 KB
Binary file not shown.

0 commit comments

Comments
 (0)