UNPKG

swordio

Version:

A medieval warrior-based programming language

13 lines (10 loc) 275 B
function GrowCell(map) { this.map = map; } GrowCell.type = "+"; GrowCell.prototype.encounter = function(enemy, vector) { enemy.type = String.fromCharCode(enemy.type.charCodeAt(0) + 1); enemy.x += vector.x; enemy.y += vector.y; }; module.exports = GrowCell;