Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
lightbulb on/off
Old
essjai
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2011
Default lightbulb on/off - 11-16-2011, 09:48 AM

"Create a world with a lightbulb (Lights) and a method turnOnOff that turns the lightbulb on/off depending on whether it is already on/off. When the lightbulb is on, its emissive color property has a value of yellow. When the lightbulb is off, it's emissive color is black. Write a Boolean function isLightOn that returns true if the light bulb is on and false if it is off. When clicked, the lightbulb should turn on/off."

Okay I know this probably sounds like a stupid question because it's such an easy task but I'm completely stuck.

I made a new event for when the mouse clicks the lightbulb.
I also created a new method turnOnOff and I made the Boolean function isLightOn. It works fine.
But I don't know what to do now. Am I supposed to put the function into the method I made, if so how do i do this? If not, what am I supposed to do?
   
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.