all files / src/cards/ Landmark.js

94.12% Statements 32/34
66.67% Branches 8/12
100% Functions 8/8
100% Lines 17/17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44    1×       2×   182×   1× 1× 182×       182×   182× 182× 182×     182× 182×     1×     182×         194×       1×     1×  
"use strict";
 
Object.defineProperty(exports, "__esModule", {
	value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; Eif ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { Eif (protoProps) defineProperties(Constructor.prototype, protoProps); Iif (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { Iif (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var Landmark = function () {
	function Landmark(_ref) {
		var name = _ref.name,
		    cost = _ref.cost,
		    description = _ref.description;
 
		_classCallCheck(this, Landmark);
 
		this.name = name;
		this.cost = cost;
		this.description = description;
 
		// set to default state
		this.activate();
		this.destroy();
	}
 
	_createClass(Landmark, [{
		key: "destroy",
		value: function destroy() {
			if (this.name !== "City Hall") this.activated = false;
		}
	}, {
		key: "activate",
		value: function activate() {
			this.activated = true;
		}
	}]);
 
	return Landmark;
}();
 
exports.default = Landmark;
//# sourceMappingURL=Landmark.js.map