Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
|
|
@ -23,13 +23,13 @@ const string[] image = new string[]{
|
|||
" ######## ####### ###### ############# ###### ",
|
||||
" "};
|
||||
|
||||
int[][] nbrs = new int[][]
|
||||
static int[][] nbrs = new int[][]
|
||||
{
|
||||
new int[]{0, -1}, new int[]{1, -1}, new int[]{1, 0}, new int[]{1, 1}, new int[]{0, 1},
|
||||
new int[]{-1, 1}, new int[]{-1, 0}, new int[]{-1, -1}, new int[]{0, -1}
|
||||
};
|
||||
|
||||
int[][][] nbrGroups = new int[][][]
|
||||
static int[][][] nbrGroups = new int[][][]
|
||||
{
|
||||
new int[][]{new int[]{0, 2, 4}, new int[]{2, 4, 6}},
|
||||
new int[][]{new int[]{0, 2, 6}, new int[]{0, 4, 6}}
|
||||
|
|
@ -62,9 +62,9 @@ extension zhangsuenOp : Matrix<CharValue>
|
|||
{
|
||||
int count := 0;
|
||||
|
||||
for (int i := 0, i < nbrs.Length, i += 1)
|
||||
for (int i := 0, i < nbrs.Length - 1, i += 1)
|
||||
{
|
||||
if (self[r + nbrs[i][1]][c + nbrs[i][0]] == $35)
|
||||
if (self[r + nbrs[i][1]][c + nbrs[i + 1][0]] == $35)
|
||||
{ count += 1 }
|
||||
};
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ extension zhangsuenOp : Matrix<CharValue>
|
|||
{
|
||||
int count := 0;
|
||||
|
||||
for (int i := 0, i < nbrs.Length, i += 1)
|
||||
for (int i := 0, i < nbrs.Length - 1, i += 1)
|
||||
{
|
||||
if (self[r + nbrs[i][1]][c + nbrs[i][0]] == $32)
|
||||
{
|
||||
|
|
@ -93,16 +93,14 @@ extension zhangsuenOp : Matrix<CharValue>
|
|||
{
|
||||
int count := 0;
|
||||
var group := nbrGroups[step];
|
||||
for(int i := 0, i < 3, i += 1)
|
||||
for(int i := 0, i < 2, i += 1)
|
||||
{
|
||||
for(int j := 0, j < group[i].Length, j += 1)
|
||||
{
|
||||
var nbr := nbrs[group[i][j]];
|
||||
|
||||
if (self[r + nbr[1]][c + nbr[0]] == $32)
|
||||
{ count := count + 1; ^ true };
|
||||
|
||||
^ false
|
||||
{ count := count + 1; $break; };
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -120,9 +118,9 @@ extension zhangsuenOp : Matrix<CharValue>
|
|||
hasChanged := false;
|
||||
firstStep := firstStep.Inverted;
|
||||
|
||||
for(int r := 1, r < self.Rows, r += 1)
|
||||
for(int r := 1, r < self.Rows - 1, r += 1)
|
||||
{
|
||||
for(int c := 1, c < self.Columns, c += 1)
|
||||
for(int c := 1, c < self.Columns - 1, c += 1)
|
||||
{
|
||||
if(self.proceed(r,c,toWhite,firstStep))
|
||||
{ hasChanged := true }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue