You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
char * getStyle ( int i , int j ) //获得棋盘中指定坐标交点位置的字符,通过制表符拼成棋盘
{
if ( p [ i ] [ j ] = = 1 ) //1为黑子
return " ● " ;
else if ( p [ i ] [ j ] = = 2 ) //2为白子
return " ○ " ;
else if ( i = = 0 & & j = = 0 ) //以下为边缘棋盘样式
return " ┏ " ;
else if ( i = = 0 & & j = = MAXIMUS - 1 )
return " ┗ " ;
else if ( i = = MAXIMUS - 1 & & j = = 0 )
return " ┓ " ;
else if ( i = = MAXIMUS - 1 & & j = = MAXIMUS - 1 )
return " ┛ " ;
else if ( i = = 0 )
return " ┣ " ;
else if ( i = = MAXIMUS - 1 )
return " ┫ " ;
else if ( j = = 0 )
return " ┳ " ;
else if ( j = = MAXIMUS - 1 )
return " ┻ " ;
return " ╋ " ; //中间的空位
}
char * getCurse ( int i , int j ) { //获得指定坐标交点位置左上格的样式,通过制表符来模拟光标的显示
if ( i = = Cx ) {
if ( j = = Cy )
return " ┏ " ;
else if ( j = = Cy + 1 )
return " ┗ " ;
}
else if ( i = = Cx + 1 )
{
if ( j = = Cy )
return " ┓ " ;
else if ( j = = Cy + 1 )
return " ┛ " ;
}
return " " ; //如果不在光标附近则为空
}