+ 2
How to model objects in a game of chess in java?
The board must be an object and the cells must be attributes or cells must be independent objects? The pieces must be objects or attributes of cells ?
1 Resposta
+ 4
The board should be a class with the attribute cells.
Like that you can create an object like:
Board table= new Board();
int cells = table.cells;