Better class oriented code

This commit is contained in:
deadprogram 2013-10-31 09:48:23 -07:00
parent a7d4a9d300
commit 6999236fe0
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ bots = [
Green = 0x0000FF
Red = 0xFF0000
ConwayRobot =
class ConwayRobot
connection:
name: 'Sphero', adaptor: 'sphero'
@ -65,7 +65,7 @@ ConwayRobot =
for bot in bots
robot = Object.create(ConwayRobot)
robot = new ConwayRobot
robot.connection.port = bot.port
robot.name = bot.name
Cylon.robot robot