Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Graphics;
- public class Board {
- public static final int UP = 1, RIGHT = 2, DOWN = 3, LEFT = 4;
- public static final int NORTHEAST = 1, SOUTHEAST = 2, SOUTHWEST = 3,
- NORTHWEST = 4;
- public static final int CLOCKWISE = 1, COUNTERCLOCKWISE = 2;
- public static boolean isClear[][];
- public static void newBoard(Graphics page) {
- isClear = new boolean[Play.DIMENSION_Y][];
- page.setColor(Color.white);
- page.fillRect(0, 0, Play.DIMENSION_X, Play.DIMENSION_Y);
- page.setColor(Color.black);
- for (int i = 0; i <= Play.DIMENSION_Y; i++) {
- isClear[i] = new boolean[5];
- for (int j = 0; j <= Play.DIMENSION_X - 1; j += 2) {
- //isClear[i][j]=true;
- if (i % 2 == 0)
- page.fillRect(j * 100, i * 100, 100, 100);
- else
- page.fillRect(j * 100 + 100, i * 100, 100, 100);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement