I want to implement the 2048 game in Java.
I made the game logics, but now I need to implement the interface.
I made 2 classes GameBox and ContainerBox that extends JComponent.
I painted in GameBox a rectagle and now I want to initialize a matrics of GameBoxes in ContainerBox so I used:
GameBox GB = new GameBox;
I am thinking about drawing the Boxes in something like this:
but I don't know how to draw those rectangles in the for...