You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
622 B

const uuid = require('node-uuid');
const Game = function() {
this.id = uuid.v4();
}
Game.prototype.getRobots = function() {
const robots = [
{x: 3, y: 1, color: 'red' },
{x: 19, y: 0, color: 'silver' },
{x: 1, y: 19, color: 'green' }
];
return robots.map(r => [r.color, r.x, r.y]);
}
Game.prototype.getWalls = function() {
const walls = [
{x: 8, y: 9, n: 1, e: 0, s: 0, w: 1 },
{x: 18, y: 9, n: 1, e: 0, s: 0, w: 1 },
{x: 4, y: 19, n: 1, e: 0, s: 0, w: 1 }
];
return walls.map(w => [w.x, w.y, w.n, w.s, w.e, w.w]);
};
module.exports = Game;