マウスの左クリックをしてから、盤面を表示する。ということをやりたいのですが・・・。
当方、HSPを使うのは久しぶりでなかなかコツが取り戻せません。
どうかよろしくお願いします。
name="連珠Ver.100" #define EMPTY 0 #define BLACK -1 #define WHITE 1 #define PLAYER -1 #define COMPUTER 1 #define WALL 4 #define UP -32 #define UP_RIGHT -31 #define RIGHT 1 #define RIGHT_DOWN 33 dim areadifpos, 4 dim board, 1024 dim yosouchi1, 1024 dim yosouchi2, 1024 randomize screen 0,800,600 ; ウィンドウ初期化 cls 0 title name areadifpos(0) = UP areadifpos(1) = UP_RIGHT areadifpos(2) = RIGHT areadifpos(3) = RIGHT_DOWN celload "RenjuBoard.bmp",1 celload "BLACK.bmp",2 celload "WHITE.bmp",3 gosub *initialize gosub *display repeat gosub *player_input gosub *display wait 1 loop stop *initialize for i,0,1024,1 board(i) = WALL next for y,6,21,1 for x,6,21,1 board(x+(y*32)) = 0 next next board(13+(13*32)) = BLACK return *display redraw pos 0,0 celput 1 for y,6,21,1 for x,6,21,1 pos (x-6)*32,(y-6)*32 color 0,0,0 if board(x+(y*32)) = BLACK: celput 2 if board(x+(y*32)) = WHITE: celput 3 next next redraw 1 return *player_input x=mousex/32+6 y=mousey/32+6 board(x+(y*32)) = WHITE return