Skip to content

Commit 66c633f

Browse files
committed
Public properties
1 parent 94e9cf6 commit 66c633f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Chapter 4/Flyweight.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ var Westros;
33
(function (Army) {
44
var Soldier = (function () {
55
function Soldier() {
6-
this.Health = 10;
7-
this.FightingAbility = 5;
8-
this.Hunger = 0;
9-
}
6+
}
7+
Soldier.prototype.Health = 10;
8+
Soldier.prototype.FightingAbility = 5;
9+
Soldier.prototype.Hunger = 0;
10+
1011
return Soldier;
1112
})();
1213
Army.Soldier = Soldier;

0 commit comments

Comments
 (0)