User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 391,572 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,829 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 428 | Replies: 3
Reply
Join Date: Jul 2008
Posts: 4
Reputation: Savion89 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Savion89 Savion89 is offline Offline
Newbie Poster

Need help in sudoku coding 4 by 4 dimentional.

  #1  
30 Days Ago
Hey guys,
gonna need some help with this sudoku coding.
simply doing for quite sometimes but it doesnt seems working in my html.

im using the x & y random number.

any comment on this ?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2007
Posts: 234
Reputation: greeny_1984 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz in Training

Re: Need help in sudoku coding 4 by 4 dimentional.

  #2  
28 Days Ago
where's the code
Reply With Quote  
Join Date: Jul 2008
Posts: 4
Reputation: Savion89 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Savion89 Savion89 is offline Offline
Newbie Poster

Re: Need help in sudoku coding 4 by 4 dimentional.

  #3  
28 Days Ago
<html>
<head>
<title> Sudoku game </title>

<script type="text/javascript">

a4 = Math.floor(Math.random()*5); 
while (a4==0)
{
a4 = Math.floor(Math.random()*5); 
}

c2 = Math.floor(Math.random()*5); 
while (c2==0)
{
c2 = Math.floor(Math.random()*5); 
}

</script>
</head>

<body>
<center>

<h1> Sudoku game </h1>

<form name="counter"><input type="text" size="8" 
name="d2"></form> 

<script> 
 var msec=0 
 var sec=90

function display()
{ 
 if (msec<=0)
	{ 
    msec=9 
    sec-=1 
	} 
 if (sec<=-1)
	{ 
    msec=0 
    sec+=1 
	} 
 else 
    msec-=1 
    document.counter.d2.value=sec+ "." +msec 
    setTimeout("display()",90) 
} 
display() 

</script> 

<form>
<table>

<tr>
<td><input type="text" id="a1" size="3"  /></td>
<td><input type="text" id="a2" size="3" /></td>
<td><input type="text" id="a3" size="3" /></td>
<td><input type="text" id="a4" size="3" /></td>
</tr>
</td>
<tr>
<td><input type="text" id="b1" size="3" /></td>
<td><input type="text" id="b2" size="3" /></td>
<td><input type="text" id="b3" size="3" /></td>
<td><input type="text" id="b4" size="3" /></td>
</tr>
<tr>
<td><input type="text" id="c1" size="3" /></td>
<td><input type="text" id="c2" size="3" /></td>
<td><input type="text" id="c3" size="3" /></td>
<td><input type="text" id="c4" size="3" /></td>
</tr>
<tr>
<td><input type="text" id="d1" size="3" /></td>
<td><input type="text" id="d2" size="3" /></td>
<td><input type="text" id="d3" size="3" /></td>
<td><input type="text" id="d4" size="3" /></td>
</tr>

</table>
<br/><br/>

<input type="button" value="Submit" onClick="submit();"/>
<input type="button" value="Refresh" onclick="reset()" />


</form>
</center>

<script type="text/javascript">

document.getElementById("a4").value=a4;
document.getElementById("a4").disabled="disabled";
window.status=a4;

document.getElementById("c2").value=c2;
document.getElementById("c2").disabled="disabled";
window.status=c2;

</script>

</body>
</html>
Last edited by Tekmaven : 27 Days Ago at 2:19 am. Reason: Code tags
Reply With Quote  
Join Date: Jul 2008
Posts: 4
Reputation: Savion89 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Savion89 Savion89 is offline Offline
Newbie Poster

Re: Need help in sudoku coding 4 by 4 dimentional.

  #4  
28 Days Ago
i think i'll random 2numbers.

Problems Im currently facing:
1) How to set counter that mark 1st , 2nd , 3rd & 4th row that form
1+2+3+4 , 2+3+4+1 , 3+4+1+2,....... total sum up to "10"

2) Prompt when the timer end.

3) Reset button what will restart the game. Once reset , my 2 random number will disappear by itself.





Thanks you people out there.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 10:24 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC