| 网站首页 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛 |
 
| 技术教程首页 | 开发语言 | WEB开发 | .NET技术 | 数据库 | 操作系统 | 网页制作 |
 
 
您现在的位置: 编程中国 >> 技术教程 >> .NET技术 >> C# >> C#技术资料 >> 正文
  ►  C# Mines(布雷) 代码
C# Mines(布雷) 代码
作者:佚名    阅读人次:……    文章来源:天极论坛整理    发布时间:2007-11-20    网友评论()条
 

 

以下是引用片段:
  }
  if(bottom<10 && left >=0)//底部和左边
  {
  if (this.mines[bottom, left] == 9)//左下方是否为9
  {
  mines[i,j] += 1;
  }
  }
  if(bottom<10 && right<10)//右下方
  {
  if (this.mines[bottom, right] == 9)右下方
  {
  mines[i,j] += 1;
  }
  }
  if(bottom<10)//底部
  {
  if (this.mines[bottom, j] == 9)//底部是否为9
  {
  mines[i,j] += 1;
  }
  }
  // if (left < 0)//左边
  // {
  // if (this.mines[i, right] == 9)//右侧是否为9
  // { count += 1; }
  // if (bottom < 10 && bottom > 0)//如果底边的范围是除过头节点和尾节点
  // {
  // if (this.mines[bottom, j] == 9)//底部是否为9
  // { count += 1; }
  // if (this.mines[bottom, right] == 9)//右下是否为9
  // { count += 1; }
  // }
  // if (top > 0 && top < 10)//上边除过头结点和尾节点
  // {
  // if (this.mines[top, j] == 9)//头上那个点是否为9
  // { count += 1; }
  // if (this.mines[top, right] == 9)//右上是否为9
  // { count += 1; }
  // }
  // }
  // if (j == this.mines.GetLength(0))
  // {
  // if (i == 0)
  // {
  // if (this.mines[i, j - 1] == 9)
  // { count += 1; }
  // if (this.mines[i - 1, j - 1] == 9)
  // { count += 1; }
  // if (this.mines[i - 1, j] == 9)
  // { count += 1; }
  //
  // }
  // if(i>0&&i 
  // {
  // if(this.mines[i+1,j-1]==9)
  // {count+=1;}
  // if (this.mines[i + 1, j] == 9)
  // { count += 1; }
  // if (this.mines[i, j - 1] == 9)
  // { count += 1; }
  // if (this.mines[i - 1, j] == 9)
  // { count += 1; }
  // if (this.mines[i - 1, j - 1] == 9)
  // { count += 1; }
  // }
  // if (i == this.mines.GetLength(1))
  // {
  // if (this.mines[i - 1, j - 1]==9)
  // { count += 1; }
  // if (this.mines[i - 1, j] == 9)
  // { count += 1; }
  // if (this.mines[i, j - 1] == 9)
  // { count += 1; }
  // }
  // }
  // this.mines[i, j] = count;
  }
  }
  }
  }

 

上一页  [1] [2] [3] 下一页

 

 
文章录入:编辑01    责任编辑:编辑01 
  • 上一篇文章:

  • 下一篇文章:

  •  
    相关文章
    原创地带
    24小时热门帖子