这是做五子棋的代码
if chess.accept(y DIV35+1,x DIV35+1)
then
from1.drawxy(y DIV35+1,x DIV35+1)
为什么除以35可以调整bmp文件的大小?
还有这句有是什么意思?
if play=black then
image1.canvas.draw(1+round(y-1)*34.9,1+round(y-1)*34.9),
image2.picture.graphc)
这是2004年程序员合订本(下)本上的
if chess.accept(y DIV35+1,x DIV35+1)
then
from1.drawxy(y DIV35+1,x DIV35+1)
为什么除以35可以调整bmp文件的大小?
还有这句有是什么意思?
if play=black then
image1.canvas.draw(1+round(y-1)*34.9,1+round(y-1)*34.9),
image2.picture.graphc)
这是2004年程序员合订本(下)本上的
then
from1.drawxy(y DIV35+1,x DIV35+1)
这句应该是在哪里接收棋子了,在哪里画一个棋子,
if play=black then
image1.canvas.draw(1+round(y-1)*34.9,1+round(y-1)*34.9),
image2.picture.graphc)
这句应该是,假如是PLAY的是黑色的,那么画黑色的棋子,估计IMAGE2里的是黑棋吧,顺便BS一下楼主,这样的代码你也看不懂,还学什么编程
不是因为懂DELPHI,呵呵。
因为这些都是自定义的函数。
你也只是猜的罢了。
image1.canvas.draw(1+round(y-1)*34.9,1+round(y-1)*34.9),
if chess.accept(y DIV35+1,x DIV35+1)
关键是里面的*34.9,DIV 35
有什么用,能说详细些吗?这些泛泛的就不要说了