seed r26 - trunk/examples/lightsoff
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r26 - trunk/examples/lightsoff
- Date: Thu, 23 Oct 2008 11:25:47 +0000 (UTC)
Author: racarr
Date: Thu Oct 23 11:25:46 2008
New Revision: 26
URL: http://svn.gnome.org/viewvc/seed?rev=26&view=rev
Log:
My life is complete.
Modified:
trunk/examples/lightsoff/lightsoff.js
Modified: trunk/examples/lightsoff/lightsoff.js
==============================================================================
--- trunk/examples/lightsoff/lightsoff.js (original)
+++ trunk/examples/lightsoff/lightsoff.js Thu Oct 23 11:25:46 2008
@@ -5,7 +5,7 @@
image_on = new Gtk.Image({"file": "./tim-on.svg"});
/* SxS size*/
-var size = 5;
+var size = 10;
var wincount = 0;
function create_board()
@@ -90,22 +90,22 @@
for (q = 0; q < count + 5; ++q)
{
- i = Math.round(4 * Math.random());
- j = Math.round(4 * Math.random());
+ i = Math.round((size-1) * Math.random());
+ j = Math.round((size-1) * Math.random());
do_click(i, j);
if (sym == 0)
{
- do_click(Math.abs(i-4), j);
+ do_click(Math.abs(i-(size-1)), j);
}
else if (sym == 1)
{
- do_click(Math.abs(i-4), Math.abs(j-4));
+ do_click(Math.abs(i-(size-1)), Math.abs(j-(size-1)));
}
else
{
- do_click(i,Math.abs(j-4));
+ do_click(i,Math.abs(j-(size-1)));
}
}
//do it again if you won already
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]