// = 0 && cheseArray[x][y-1] == chessState.None){
return true;
}
if(y + 1 = 0 &&cheseArray[x - 1][y] == chessState.None){
return true;
}
return false;
}

//»ñµÃÏàÁڵļº·½Æå×Ó
function getContentedSelfChessArray(selectedChess){
var array = new Array();
var x = selectedChess.x;
var y = selectedChess.y;
if(y - 1 >= 0 && cheseArray[x][y - 1] == selectedChess.state){
var chess = new Object();
chess.x = x;
chess.y = y - 1;
chess.state = cheseArray[chess.x][chess.y];
array.push(chess);
}
if( x - 1 >= 0 && cheseArray[x - 1][y] == selectedChess.state){
var chess = new Object();
chess.x = x - 1;
chess.y = y;
chess.state = cheseArray[chess.x][chess.y];
array.push(chess);
}
if(y + 1 = 0 &&
cheseArray[x][y - 1] != selectedChess.state &&
cheseArray[x][y - 1] != chessState.None){
var chess = new Object();
chess.x = x;
chess.y = y - 1;
chess.state = cheseArray[chess.x][chess.y];
array.push(chess);
}
if(x - 1 >= 0 &&
cheseArray[x - 1][y] != selectedChess.state &&
cheseArray[x - 1][y] != chessState.None){
var chess = new Object();
chess.x = x - 1;
chess.y = y;
chess.state = cheseArray[chess.x][chess.y];
array.push(chess);
}
if(y + 1

最新文章

  1. javascript函数小练习
  2. vue相关的 helloword示例
  3. HDU 2222 AC自动机模板题
  4. GC之七--gc日志分析工具
  5. 浅析对象访问属性的"."和"[]"方法区别
  6. struts不同session范围添加、访问属性
  7. mysql有回滚,php没有回滚的说法
  8. 使用Visio进行UML建模
  9. oracle decode函数使用方法
  10. 关于泥水佬的minihttp与MVC4的对比
  11. python操作redis-过期时间
  12. Scale-up(纵向扩展) vs Scale-out(横向扩展)
  13. 删除workspace下的vss的scc文件
  14. SSM-SpringMVC-28:SpringMVC类型转换之自定义日期类型转换器
  15. 配置MySQL的数据源
  16. npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6
  17. Zookeeper 在Windows下的安装过程及测试
  18. 配置iis支持json解析,配置ssi
  19. 在Github上搭建博客
  20. 5.UiScrollable API 详细介绍

热门文章

  1. 非常郁闷的 .NET中程序集的动态加载
  2. Java NIO5:选择器1---理论篇
  3. C# Azure 存储-Blob
  4. struts1一:基本简介
  5. Atitit 边缘检测原理attilax总结
  6. iOS完整学习路线图
  7. Sql Server系列:通用表表达式CTE
  8. 解密jQuery内核 DOM操作的核心函数domManip
  9. WPF 弹出UserControl
  10. MVC5 网站开发实践 概述