hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
How do I get the dimentions of the grid?

 
Reply to topic    hacker.org Forum Index » Crossflip View previous topic
View next topic
How do I get the dimentions of the grid?
Author Message
laz0r



Joined: 04 Feb 2010
Posts: 290
Location: Within the depths of Unix

Post How do I get the dimentions of the grid? Reply with quote
I've tryed searching for something meaningful in the source code, but all I can find is alot of scripting that I don't understand. Is there any other way I can get the dimentions of the grid or any help as to which bit in the source code I should extract from?

Thanks

_________________
There is no spoon.
Mon Mar 01, 2010 10:14 am View user's profile Send private message
CodeX



Joined: 17 Oct 2008
Posts: 350

Post Reply with quote
the line like <script>var boardinit = "1110,0011,1102,1100";var level = 46;</script> is all you need, this example has 4 rows and 4 columns:
Code:
rows = boardinit.count(',') + 1
columns = len( boardinit[0 : boardinit.indexof(',')] )

where boardinit is the string extracted from the page (1110,0011,1102,1100 in the example) as for the value, 0 is lit, 1 is dark and 2 is a blocker.
Mon Mar 01, 2010 11:09 am View user's profile Send private message
laz0r



Joined: 04 Feb 2010
Posts: 290
Location: Within the depths of Unix

Post Reply with quote
CodeX wrote:
the line like <script>var boardinit = "1110,0011,1102,1100";var level = 46;</script> is all you need, this example has 4 rows and 4 columns:
Code:
rows = boardinit.count(',') + 1
columns = len( boardinit[0 : boardinit.indexof(',')] )

where boardinit is the string extracted from the page (1110,0011,1102,1100 in the example) as for the value, 0 is lit, 1 is dark and 2 is a blocker.


Thanks, I don't know how I missed it.

_________________
There is no spoon.
Mon Mar 01, 2010 1:36 pm View user's profile Send private message
hackerforce



Joined: 01 Jul 2009
Posts: 4

Post Reply with quote
[quote="laz0r"]
CodeX wrote:
the line like <script>var boardinit = "1110,0011,1102,1100";var level = 46;</script> is all you need, this example has 4 rows and 4 columns:
Code:
rows = boardinit.count(',') + 1
columns = len( boardinit[0 : boardinit.indexof(',')] )

where boardinit is the string extracted from the page (1110,0011,1102,1100 in the example) as for the value, 0 is lit, 1 is dark and 2 is a blocker.

Sat Mar 06, 2010 12:37 pm View user's profile Send private message
hackerforce



Joined: 01 Jul 2009
Posts: 4

Post Reply with quote
[quote="laz0r"]
CodeX wrote:
the line like <script>var boardinit = "1110,0011,1102,1100";var level = 46;</script> is all you need, this example has 4 rows and 4 columns:
Code:
rows = boardinit.count(',') + 1
columns = len( boardinit[0 : boardinit.indexof(',')] )

where boardinit is the string extracted from the page (1110,0011,1102,1100 in the example) as for the value, 0 is lit, 1 is dark and 2 is a blocker.

Sat Mar 06, 2010 12:37 pm View user's profile Send private message
dreamhosting



Joined: 26 Apr 2010
Posts: 3

Post PLEASE HELP Reply with quote
Can you give ma a java chat script that will work on mobile phones were there is staff and admin iv been looking for such script for more than 5years now
Mon Apr 26, 2010 10:16 am View user's profile Send private message Send e-mail
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Crossflip All times are GMT
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.