-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathBoardDisplay.cpp
More file actions
103 lines (91 loc) · 3.34 KB
/
Copy pathBoardDisplay.cpp
File metadata and controls
103 lines (91 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#include "stdafx.h"
#include "data.h"
#include "chess.h"
#include "Resource.h"
#include "pregen.h"
void BoardDisplay(uint8 B256[256], TCHAR* reason){
//珆尨絞腔B256攫醱
//LogOut(ColorShout,reason,true);
LogOut(reason);
//ConsoleOutput(reason,(int)strlen(reason),true);
static TCHAR *c_BoardStrSim[19] = {
_T(" 庚--房--房--房--房--房--房--房--庖 \n"),
_T(" 岫 岫 岫 岫�岫ㄞ岫 岫 岫 岫 \n"),
_T(" 念--拈--拈--拈--↗--拈--拈--拈--怕 \n"),
_T(" 岫 岫 岫 岫ㄞ岫�岫 岫 岫 岫 \n"),
_T(" 念--拈--拈--拈--拈--拈--拈--拈--怕 \n"),
_T(" 岫 岫 岫 岫 岫 岫 岫 岫 岫 \n"),
_T(" 念--拈--拈--拈--拈--拈--拈--拈--怕 \n"),
_T(" 岫 岫 岫 岫 岫 岫 岫 岫 岫 \n"),
_T(" 念--拂--拂--拂--拂--拂--拂--拂--怕 \n"),
_T(" 岫 岫 \n"),
_T(" 念--房--房--房--房--房--房--房--怕 \n"),
_T(" 岫 岫 岫 岫 岫 岫 岫 岫 岫 \n"),
_T(" 念--拈--拈--拈--拈--拈--拈--拈--怕 \n"),
_T(" 岫 岫 岫 岫 岫 岫 岫 岫 岫 \n"),
_T(" 念--拈--拈--拈--拈--拈--拈--拈--怕 \n"),
_T(" 岫 岫 岫 岫�岫ㄞ岫 岫 岫 岫 \n"),
_T(" 念--拈--拈--拈--↗--拈--拈--拈--怕 \n"),
_T(" 岫 岫 岫 岫ㄞ岫�岫 岫 岫 岫 \n"),
_T(" 弩--拂--拂--拂--拂--拂--拂--拂--彼 \n")
};
static TCHAR chessStr[16][4] = {
_T("渣"),
_T("�"), _T("帊"), _T("眈"), _T("醪"), _T("�"), _T("蘿"), _T("條"),
_T(""), _T("尪"), _T("砓"), _T("鎮"), _T("陬"), _T("婦"), _T("逑"),
_T("渣")
};
TCHAR buf[512];
for(int r = 0; r < 19; r++){
swprintf_s(buf, sizeof(buf) / sizeof(TCHAR), c_BoardStrSim[r]);
if(r%2 == 0){
TCHAR* p = c_BoardStrSim[r];
for(int f = 0; f < 9; f++){
int chess = B256[XYtoS(f+3, r/2+3)];
//if(chess != 0){
// buf[f*4+1] = chessStr[chess][0];
// buf[f*4+2] = chessStr[chess][1];
//}
if(IsWhite(chess)){
Colorize(ColorShout,TRUE);
ConsoleOutput(buf+(f*4+0),1,TRUE);
Colorize(ColorSeek,TRUE);
ConsoleOutput(chessStr[chess],2,TRUE);
Colorize(ColorShout,TRUE);
ConsoleOutput(buf+(f*4+3),1,TRUE);
}
else if(IsBlack(chess)){
Colorize(ColorShout,TRUE);
ConsoleOutput(buf+(f*4+0),1,TRUE);
Colorize(ColorChannel1,TRUE);
ConsoleOutput(chessStr[chess],2,TRUE);
Colorize(ColorShout,TRUE);
ConsoleOutput(buf+(f*4+3),1,TRUE);
}
else{
Colorize(ColorShout,TRUE);
ConsoleOutput(buf+(f*4),4,TRUE);
}
}
//LogOut(ColorShout,"\n",true);
LogOut(_T("\n"));
}
else{
//LogOut(ColorShout,buf,true);
LogOut(buf);
}
}
}
//void LogOut(ColorClass cc, char* data, bool NotShout){
//
// int len = (int)strlen(data);
// Colorize(cc,NotShout);
//
// if(len > 0){
// LogOutput(data,len,TRUE);
// //if(IsReturn){ //樓奻珨跺隙陬
// // LogOutput("\n",1,FALSE);
// //}
// }
//
//}