Skip to content

Commit e93a3cf

Browse files
committed
some changes in programming/lab3
1 parent c88de83 commit e93a3cf

File tree

16 files changed

+190
-29
lines changed

16 files changed

+190
-29
lines changed

BCS_or_OPD/sem1/.~lock.1.odt#

Lines changed: 0 additions & 1 deletion
This file was deleted.

programming/sem1/lab3/out/production/lab3/.idea/uiDesigner.xml

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.
Binary file not shown.
166 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-194 Bytes
Binary file not shown.

programming/sem1/lab3/src/Character/BasicCharacter.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public abstract class BasicCharacter implements IBasicObj {
88
private final int id;
99
protected Cloth cloth;
1010
private int energy;
11+
private int potatoes;
1112

1213
// init
1314
public BasicCharacter(String name) {
@@ -16,20 +17,15 @@ public BasicCharacter(String name) {
1617
}
1718

1819
// Cloth setter
19-
public void setCloth(Cloth cloth){
20-
this.cloth = cloth;
21-
}
20+
public void setCloth(Cloth cloth){ this.cloth = cloth; }
2221

23-
// Energy getter/setter + increment
24-
public void setEnergy(int energy){
25-
this.energy = energy;
26-
}
27-
public int getEnergy(){
28-
return this.energy;
29-
}
30-
public void makeEnergyStep(){
31-
this.energy -= 1;
32-
}
22+
// Energy getter/setter
23+
public void setEnergy(int energy) { this.energy = energy; }
24+
public int getEnergy(){ return this.energy; }
25+
26+
// Potatoes getter/setter
27+
public void setPotatoes(int potatoes) { this.potatoes = energy; }
28+
public int getPotatoes(){ return this.potatoes; }
3329

3430
// IBasicObj getters
3531
public String getName(){ return this.name; }

0 commit comments

Comments
 (0)