How do I get the dimentions of the grid?

Post Reply
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

How do I get the dimentions of the grid?

Post by laz0r »

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.
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

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: Select all

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.
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by 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: Select all

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.
hackerforce
Posts: 4
Joined: Wed Jul 01, 2009 2:07 pm

Post by hackerforce »

laz0r wrote:
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: Select all

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.
hackerforce
Posts: 4
Joined: Wed Jul 01, 2009 2:07 pm

Post by hackerforce »

laz0r wrote:
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: Select all

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.
dreamhosting
Posts: 3
Joined: Mon Apr 26, 2010 10:06 am

PLEASE HELP

Post by dreamhosting »

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
Post Reply