-
- const int x = ((int)file) * 8;
- const int y = (7 - (int)rank) * 3;
- for (int i = 1; i < 8; ++i)
- board[y][x+i] = board[y+3][x+i] = '-';
- for (int i = 1; i < 3; ++i)
- board[y+i][x] = board[y+i][x+8] = '|';
- board[y][x] = board[y][x+8] = board[y+3][x+8] = board[y+3][x] = '+';
- if (pc != NO_PIECE)
- board[y+1][x+4] = PieceToChar[pc];
- if (value != VALUE_NONE)
- format_cp_compact(value, &board[y+2][x+2]);
+ const int x = int(file) * 8;
+ const int y = (7 - int(rank)) * 3;
+ for (int i = 1; i < 8; ++i)
+ board[y][x + i] = board[y + 3][x + i] = '-';
+ for (int i = 1; i < 3; ++i)
+ board[y + i][x] = board[y + i][x + 8] = '|';
+ board[y][x] = board[y][x + 8] = board[y + 3][x + 8] = board[y + 3][x] = '+';
+ if (pc != NO_PIECE)
+ board[y + 1][x + 4] = PieceToChar[pc];
+ if (value != VALUE_NONE)
+ format_cp_compact(value, &board[y + 2][x + 2]);