Skip to content

Commit 5271c13

Browse files
committed
Merge branch 'gh-pages' of https://github.com/dhandeo/potts-simulation into gh-pages
2 parents 2a0c4ac + 2e46190 commit 5271c13

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

Init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ function start()
9696
}, 0);
9797
}
9898
});
99-
}
99+
}

Simulation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ Simulation.prototype.Draw = function()
5353
for(var i = 0; i < this.x; i++)
5454
{
5555
// Select the colors from the pallette
56-
if (this.grid[j][i] >this.palette.length -1 )
56+
if (this.grid[j][i] > this.palette.length - 1 )
5757
{
58-
this.ctx.fillStyle =this.palette[0];
58+
this.ctx.fillStyle = this.palette[0];
5959
}
6060
else
6161
{
@@ -90,7 +90,7 @@ Simulation.prototype.Flip = function(i,j)
9090
}
9191
else
9292
{
93-
this.grid[i][j] = 1;
93+
this.grid[i][j] = 1;
9494
}
9595
}
9696

Target.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Target( width, height, no_axons, sim_no)
1111
{
1212
// Call super constructor.
1313
Simulation.call( this, width, height );
14-
this.sim_no = sim_no ;
14+
this.sim_no = sim_no + 1 ;
1515
this.no_axons = no_axons;
1616
this.palette = alphabet_palette;
1717

index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<head>
55

6-
<title> 2d Potts Model Like Simulation </title>
6+
<title> 2d Potts Model Like Simulation </title>
77

88
<script src="jquery/jquery-1.9.1.min.js"></script>
99
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
@@ -13,7 +13,6 @@
1313
</head>
1414

1515
<body onload=start()>
16-
1716
<style type="text/css">
1817
.fieldset-auto-width {
1918
display: inline-block;
@@ -72,4 +71,4 @@
7271
<script src="Init.js"></script>
7372

7473
</body>
75-
</html>
74+
</html>

0 commit comments

Comments
 (0)