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 ?
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 ?
where's the code
<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>
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.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.