MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / addBoard

Method addBoard

Programs/Games/peg-solitaire/PegSolitaire.java:507–514  ·  view source on GitHub ↗

Method to add cell buttons to the frame for first 5 types.

()

Source from the content-addressed store, hash-verified

505 * Method to add cell buttons to the frame for first 5 types.
506 */
507 public void addBoard(){
508 for (int i = 0; i < board.length; ++i){
509 for (int j = 0; j < board[0].length; ++j){
510 if (board[i][j].getBackground() == Color.WHITE) add(new JLabel());
511 else add(board[i][j]);
512 }
513 }
514 }
515
516 /**
517 * Method to add cell buttons to the frame for last type.

Callers 5

Board1Method · 0.95
Board2Method · 0.95
Board3Method · 0.95
Board4Method · 0.95
Board5Method · 0.95

Calls 1

addMethod · 0.65

Tested by

no test coverage detected