OZONE Asylum
Forums
DHTML/Javascript
JavaScript Set Game
This page's ID:
30503
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Spam Bumped thread but I want to make comment anyway. This is a very nice tidy mind bending game. Took me a while but I got the hang of and now am reasonably proficient. However, the coding is not very elegant - all those if's and else's. [code]1 red 2 green 4 purple 8 empty 16 shaded 32 solid 64 oval 128 diamond 256 squiggle 512 1 1024 2 2048 3 a) red empty diamond 1 = 001 010 001 001 b) red shaded diamond 2 = 010 010 010 001 c) red solid diamond 3 = 100 010 100 001 bitPat = a OR b OR c = 111 010 111 001 score=0; for(i=0;i<4;i++) { bitCnt=0; for(j=0;j<3;j++) { bitCnt+=(bitPat & 1); bitPat>>1; }; if(bitCnt==3 || bitCnt==1) score++; }; if(score==4) alert("winner"); [/code]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »