From 64a98449d5606e41112e422dc86c9049128c1f0c Mon Sep 17 00:00:00 2001 From: Anastasia Date: Mon, 9 Dec 2019 20:33:11 +0200 Subject: [PATCH 1/2] new method --- index.html | 2 ++ models/croco-turtle.js | 4 ++++ models/monkey.js | 2 ++ 3 files changed, 8 insertions(+) diff --git a/index.html b/index.html index ac51185..5317ad1 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,8 @@ + + diff --git a/models/croco-turtle.js b/models/croco-turtle.js index c0e7f6c..a254c44 100644 --- a/models/croco-turtle.js +++ b/models/croco-turtle.js @@ -6,5 +6,9 @@ var CrocoTurtle = (function () { CrocoTurtle.prototype = Object.create(Unit.prototype); CrocoTurtle.prototype.constructor = CrocoTurtle; + CrocoTurtle.prototype.step = function() { + console.log('Step') + } + return CrocoTurtle; }()); diff --git a/models/monkey.js b/models/monkey.js index b9d646f..fba5cee 100644 --- a/models/monkey.js +++ b/models/monkey.js @@ -6,6 +6,8 @@ var Monkey = (function() { Monkey.prototype = Object.create(Unit.prototype) Monkey.prototype.constructor = Monkey + + return Monkey; }()); From 44e9f7771041f01dae30e1933cba6789ab1f59c0 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Mon, 9 Dec 2019 20:37:05 +0200 Subject: [PATCH 2/2] method in master --- models/croco-turtle.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/croco-turtle.js b/models/croco-turtle.js index c0e7f6c..ae8e658 100644 --- a/models/croco-turtle.js +++ b/models/croco-turtle.js @@ -6,5 +6,9 @@ var CrocoTurtle = (function () { CrocoTurtle.prototype = Object.create(Unit.prototype); CrocoTurtle.prototype.constructor = CrocoTurtle; + CrocoTurtle.prototype.step = function() { + console.log('Step') + } + return CrocoTurtle; }());