Mon Jul 3 03:06:01 UTC 2023 inscode

上级 13d33c21
...@@ -44,7 +44,7 @@ input { ...@@ -44,7 +44,7 @@ input {
} }
.border-top { .border-top {
border-top: 1px solid var(--color-border); border-top: 1px solid #999;
} }
.content-lattice { .content-lattice {
...@@ -71,7 +71,7 @@ input { ...@@ -71,7 +71,7 @@ input {
text-align: center; text-align: center;
height: 1px; height: 1px;
width: 100%; width: 100%;
background: var(--color-border); background: #999;
position: absolute; position: absolute;
top: calc(50% - 1px); top: calc(50% - 1px);
left: 0; left: 0;
...@@ -82,7 +82,7 @@ input { ...@@ -82,7 +82,7 @@ input {
content: ''; content: '';
width: 1px; width: 1px;
height: 100%; height: 100%;
background: var(--color-border); background: #999;
position: absolute; position: absolute;
left: calc(50% - 1px); left: calc(50% - 1px);
top: 0; top: 0;
...@@ -96,7 +96,7 @@ input { ...@@ -96,7 +96,7 @@ input {
height: 90%; height: 90%;
top: calc((20px - 20px * 0.9) * 0.5); top: calc((20px - 20px * 0.9) * 0.5);
left: calc((20px - 20px * 0.9) * 0.5); left: calc((20px - 20px * 0.9) * 0.5);
border: 1px solid var(--color-border); border: 1px solid #999;
} }
/* 竖线隐藏 */ /* 竖线隐藏 */
...@@ -108,17 +108,16 @@ input { ...@@ -108,17 +108,16 @@ input {
.isWhite::after { .isWhite::after {
background-color: white; background-color: white;
border: 1px solid var(--color-border);
} }
.isBlack::after { .isBlack::after {
background-color: black; background-color: black;
border: 1px solid var(--color-border); border-color: black;
} }
.isWin::after { .isWin::after {
background-color: red; background-color: red;
border: 1px solid var(--color-border); border-color: red;
} }
.space-nowrap { .space-nowrap {
......
...@@ -135,6 +135,7 @@ function getDirectionScore(board, row, col, [x, y]) { ...@@ -135,6 +135,7 @@ function getDirectionScore(board, row, col, [x, y]) {
_row += x _row += x
_col += y _col += y
} }
// 判断边距
return res return res
} }
/** /**
...@@ -148,8 +149,11 @@ function getDirectionScore(board, row, col, [x, y]) { ...@@ -148,8 +149,11 @@ function getDirectionScore(board, row, col, [x, y]) {
* *
* 是以一条线的记录积分,一个位置上正负方向为一条线 * 是以一条线的记录积分,一个位置上正负方向为一条线
* 当一个位置上 横 竖 斜 反斜 位置上都有棋子 * 当一个位置上 横 竖 斜 反斜 位置上都有棋子
* 积分最多为 4 * (10**(8-1)) = 40000000 * 积分最多为 4 * (10**8) = 400000000
* 积分最小为 4 * (10**(2-1)) = 40 * 积分最小为 4 * (10**0) = 4
*
* 边界判断
* 如果在棋盘边缘,需要判断连子最多有几颗,小于5颗,可以直接放弃当前位置
*/ */
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册