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

Commit 6f8c177

Browse files
committed
Lab3 init
1 parent 6e31e7e commit 6f8c177

File tree

63 files changed

+2696
-40
lines changed

Some content is hidden

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

63 files changed

+2696
-40
lines changed

.DS_Store

0 Bytes
Binary file not shown.

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.
0 Bytes
Binary file not shown.

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

Lines changed: 18 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lab_2_2021_2_(ZERG_CHESS)█████████/src/logic/game/GameSystem.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,11 @@ public void removeDeadPieces(ArrayList<BaseUnit> allPieces) {
9292
public BaseUnit promote(BaseUnit baseUnit, int choice) {
9393
switch (choice) {
9494
case 0:
95-
BaseUnit self1 = new MeleeUnit(baseUnit.getColumn(), baseUnit.getRow(), baseUnit.isWhite(), baseUnit.getName());
96-
return self1;
95+
return (BaseUnit) new MeleeUnit(baseUnit.getColumn(), baseUnit.getRow(), baseUnit.isWhite(), baseUnit.getName());
9796
case 1:
98-
BaseUnit self2 = new RangeUnit(baseUnit.getColumn(), baseUnit.getRow(), baseUnit.isWhite(), baseUnit.getName());
99-
return self2;
97+
return (BaseUnit) new RangeUnit(baseUnit.getColumn(), baseUnit.getRow(), baseUnit.isWhite(), baseUnit.getName());
10098
case 2:
101-
BaseUnit self3 = new FlyingUnit(baseUnit.getColumn(), baseUnit.getRow(), baseUnit.isWhite(), baseUnit.getName());
102-
return self3;
99+
return (BaseUnit) new FlyingUnit(baseUnit.getColumn(), baseUnit.getRow(), baseUnit.isWhite(), baseUnit.getName());
103100
default:
104101
return baseUnit;
105102
}

Lab_3_2021_2_(Abstraction)█████████/.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lab_3_2021_2_(Abstraction)█████████/.idea/libraries/junit_jupiter_api.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lab_3_2021_2_(Abstraction)█████████/.idea/libraries/junit_platform_console_standalone_1_9_0.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lab_3_2021_2_(Abstraction)█████████/.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lab_3_2021_2_(Abstraction)█████████/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)