...me again.... <img src="smileys/smiley18.gif" border="0" align="middle" />
I am looking for bitwise operations like AND. Right now, I would like to use AND to set flags for puzzle pieces that have been collected.
And idea where I can find this?
I made a plugin last week-end for my own use... Could share it
I could use something like that too, —
Sharing is caring!
At your own risk
Thanks! <img src="smileys/smiley1.gif" border="0" align="middle" />
Do you really need bitwise AND for this? How about a bunch of separate boolean instance variables?
Develop games in your browser. Powerful, performant & highly capable.
Actually it makes things easier. If you have 8 puzzle-pieces you can set them with OR and then check the value of the variable to be equal with 255....
Ashley > I actually use bitwise operation to make a kind of tree.
A Parent contain the bits of its child. And leaves are power of two (only one bit set), so to find if an element is in a tree or another, or if an element is an ancestor to another it become really simple.