在窗体上添加: ChessBoard - PictureBox,AutoRedraw=true,width=3000,height=3000,Enabled=false Command1 - Button,Caption="开战" Command2 - Button,Caption="退出" 'White By RichTextBox (张力-广西百色市) Option Explicit Option Base 1 Dim cx As Long, cy As Lon g Dim ch(3, 3
void CMyDlg::chessBoard(int tr, int tc, int dr, int dc, int size) { if(1 == size) { return; } Sleep(1000); //覆盖L型骨牌后停顿0.01秒,以便观察 int t = this->tile++; int s = size/2; if(dr < tr+s && dc DrawSubBoard(tr+s-1,tc+s-1,m_dw,t);//递归过程中,此子棋盘中没有特殊方格,调用
这个脚本可以设置棋盘格为任意数量和任意尺寸.只需要改下脚本参数即可.脚本中有注释.
//Create variables for the 650x400 pixel board divided in even 50 x 50 squares (0.5mmx0.5mm)
var docWidth = 650
var docHeight =400
var cells = 80
var cellSize = docHeight / cells
// create a new document
v