From 33f8a876a532a3b45c97b53f820d0d6dbc548386 Mon Sep 17 00:00:00 2001 From: Ron Evans Date: Wed, 6 Nov 2013 12:33:58 -0800 Subject: [PATCH] Update sphero_multiple.litcoffee Use the nicer class based syntax --- examples/sphero_multiple.litcoffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/sphero_multiple.litcoffee b/examples/sphero_multiple.litcoffee index 285f169..c7d0b6c 100644 --- a/examples/sphero_multiple.litcoffee +++ b/examples/sphero_multiple.litcoffee @@ -12,9 +12,9 @@ already here: Cylon = require '..' Since both of our Spheros are going to have faily similar behaviour, we can -define a base object to hold their attributes: +define a class to hold their attributes: - SpheroRobot = + class SpheroRobot We'll define the Sphero's connection sans port, which we'll add later. @@ -50,7 +50,7 @@ Now that the pieces are in place, we can start making our robots. We'll make a new instance of `SpheroRobot`, and modify it. - robot = Object.create SpheroRobot + robot = new SpheroRobot Now we'll tell the robot what it's name is, and what it's connection port should be: