-
Notifications
You must be signed in to change notification settings - Fork 0
/
othelo_prosessing.pde
63 lines (53 loc) · 1.33 KB
/
othelo_prosessing.pde
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
/*初期ウィンドウサイズ*/ //<>//
final int WINDOW_WIDTH = 1000;
final int WINDOW_HEIGHT = 1200;
/*盤面*/
boolean othello_black[][] = new boolean[8][8];
boolean othello_white[][] = new boolean[8][8];
/*マウス位置*/
boolean highlight[][] = new boolean[8][8];
boolean turn; //true:black,false:white
int mode;
final int score_height = 100;
final int board_height = 300;
final int botton_height = 1400;
Window win = new Window();
Botton option[] = new Botton[3];
Botton board[][] = new Botton[8][8];
void setup() {
for (int i=0; i<3; i++)option[i] = new Botton();
for (int i=0; i<8; i++)for (int j=0; j<8; j++)board[i][j] = new Botton();
frameRate(60);
win.setWindow(WINDOW_WIDTH, WINDOW_HEIGHT, 1000, 1500);
win.margin(20);
}
void draw() {
background(#e5b26a);
//print((int)frameRate);
//println("fps");
//win.drawWindow();
switch(mode) {
case 0: //初期化
boardReset();
mode++;
case 1: //メイン処理
mouseCD();
optionBotton();
drawScore();
drawBoard();
drawCursor();
break;
case 2: //ソート待機
isHintMode=false;
clearHighlight();
optionBotton();
drawScore();
drawBoard();
case 3:
isHintMode=false;
clearHighlight();
optionBotton();
drawScore();
drawBoard();
}
}