-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathisEdge.js
More file actions
45 lines (39 loc) · 776 Bytes
/
isEdge.js
File metadata and controls
45 lines (39 loc) · 776 Bytes
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
45
// Generated by CoffeeScript 1.6.1
var PlaceRobot, RobotLand, isEdge, robot;
robot = {
input1: 1,
input2: 4,
input3: "n"
};
RobotLand = function(input1, input2, input3) {
var RobotLanded, landX, landY, oriented;
landX = input1;
landY = input2;
oriented = input3;
RobotLanded = [landX, landY, oriented];
return PlaceRobot(RobotLanded);
};
PlaceRobot = function(landingData) {
return console.log(landingData);
};
RobotLand(robot);
isEdge = function(x, y, ylimit, xlimit) {
var E, N, S, W;
if (x === 0) {
S = "edge";
console.log(S);
}
if (y === ylimit) {
N = "edge";
console.log(N);
}
if (x === 0) {
W = "edge";
console.log(W);
}
if (x === xlimit) {
E = "edge";
console.log(E);
}
};
isEdge(3, 9, 6, 9);