Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
one question
Old
simsman2011
Senior Member
 
simsman2011's Avatar
 
Status: Offline
Posts: 132
Join Date: Jul 2011
Location: somewhere on Earth
Default one question - 08-02-2011, 04:23 AM

how can I save or move a method from a world to another?


==========ــــــــــــــــــــــــــــــــــــــ==============
==========SiMsMaN.....2O11=============
==========ــــــــــــــــــــــــــــــــــــــ==============

Last edited by simsman2011; 08-09-2011 at 02:24 PM.
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-02-2011, 08:55 AM

When you make a variable, such as canMove, the only important thing is the type of variable such as number,bool,string, etc. The variables name has absolutely no consolation to the functionality of the program, so no, Alice does not understand the name of your variable because it does not care, but it is very important that you name your variables properly so that you understand what they will be used for; it makes everything a lot easier.

As for your second question I don't believe it is possible.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein

Last edited by legolizard; 08-02-2011 at 08:58 AM.
   
Reply With Quote
Old
simsman2011
Senior Member
 
simsman2011's Avatar
 
Status: Offline
Posts: 132
Join Date: Jul 2011
Location: somewhere on Earth
Default 08-02-2011, 04:12 PM

OK. what is the difference between number,bool and string?
(I think I know but I want to be sure about my information)


==========ــــــــــــــــــــــــــــــــــــــ==============
==========SiMsMaN.....2O11=============
==========ــــــــــــــــــــــــــــــــــــــ==============
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-02-2011, 04:16 PM

There are all different data types a number well is a number variable, a bool is a true and false variable, and a string is a text variable.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Old
simsman2011
Senior Member
 
simsman2011's Avatar
 
Status: Offline
Posts: 132
Join Date: Jul 2011
Location: somewhere on Earth
Default 08-03-2011, 04:20 AM

I think that looks strange......
anyway, how can the programme stop world from moving through (world.canMove) method?


==========ــــــــــــــــــــــــــــــــــــــ==============
==========SiMsMaN.....2O11=============
==========ــــــــــــــــــــــــــــــــــــــ==============
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-03-2011, 08:07 AM

Are you confusing a method with a variable? Since the the purpose of having the variable canMove is to check to see if you can move or not, and the moving part is the method.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Old
simsman2011
Senior Member
 
simsman2011's Avatar
 
Status: Offline
Posts: 132
Join Date: Jul 2011
Location: somewhere on Earth
Default 08-03-2011, 06:25 PM

What I am tring to say is:
When making a bool variable {world.canMove}==false no object in the world can move but when It changes into {world.canMove}==true any object can move..........
How does this happen?..........
the world do What I am saying...........
(That can be a stupid question but I just want to know)


==========ــــــــــــــــــــــــــــــــــــــ==============
==========SiMsMaN.....2O11=============
==========ــــــــــــــــــــــــــــــــــــــ==============
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-03-2011, 07:11 PM

Well the computer reads the condition and if it is true it does the below coding else does something else. Think of it this way:

The computer works in a special code called binary code. It is called binary code because it only contains two numbers, 0 and 1; 0 being off and 1 being on. These 0's and 1's are interpreted by your computer which then outputs something you, the user, will understand. Everything a computer does is at it's most basic level binary code. So when a variable is false it's value would be 0 in binary because it is off, while if it was true then it would be a 1. So the computer takes the binary value of your variable and then compares it with the other specified binary value; if you specified true then 1, if you specified false then 0.

That is the way that I have always understood it, but there may be another explanation.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Old
simsman2011
Senior Member
 
simsman2011's Avatar
 
Status: Offline
Posts: 132
Join Date: Jul 2011
Location: somewhere on Earth
Default 08-03-2011, 07:46 PM

What I am talking about is the word (canMove) why it prevents world from moving (when it is false) .....why it doesn't do anything except that??????
(I am NOT talking about true or false)


==========ــــــــــــــــــــــــــــــــــــــ==============
==========SiMsMaN.....2O11=============
==========ــــــــــــــــــــــــــــــــــــــ==============
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 08-03-2011, 08:01 PM

Ah now I see. The canMove variable stops things from moving because that is how you are using, it can be used in any way you wish because the name serves no purpose for the computer only for you so that you don't get confused.


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Reply

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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.