hi
i'm trying to create a game called "Gomuku", but I don't know how to start this is my first game ever.. I need to create 10x10 board, JPanel, JButton to start the game "New Game" and a class called Square.java that holds int x,y,accupied;
this is Square.java class
public class Square {
private final int row ;
private final int col ;
private int accupied=0;
public Square(int r, int c) {
row = r;
col = c;
}
public void setAccupied(int ac) {
accupied = ac;
}
public int getAccupied()
{
return accupied;
}
}//end square class
class Board extends JPanel
{
private Square sq[][] ;
public void paintComponent(Graphics g)
{ sq[10][10] = new Square(10,10);
for (int row = 0; row < 10; row++) {
for (int column = 0; column < 10; column++) {
Square[row][column] = 0;
}
}
g.drawRect();
}
}//end class board
I want to draw the squares now with this method g.drawRect(); but it takes four parameters

do you know where to get examples like that maybe I will get benefit of them?
I'm just beginning to learn how to create games like these using Square.java class and a JPanel.
Thanks