UNPKG
swordio
Version:
latest (0.2.0)
0.2.0
0.1.1
0.1.0
A medieval warrior-based programming language
github.com/mrfishie/swordio
cpdt/swordio
swordio
/
lib
/
cells
/
GrowCell.js
13 lines
(10 loc)
•
275 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
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
;