I\'m creating a chess game with java.
As you know when you start out the chess game you have two of each \"Captains\" (sorry I\'m not sure what the term is) I have c
Because of fall through (execution continues to the next case
statement unless you put a break;
at the end, or of course, as in your case, a return
), you can just put the cases under each other:
...
case 1:
case 8:
Rook tower = new Rook("");
return tower.getBrik();
case 3:
case 6:
Bishop bishop = new Bishop("");
return bishop.getBrik();
...