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

Method is_valid_up

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

Method to determine if move is valid for the up. @param yRow Row value of the selected cell. @param yCol Column value of the selected cell. @param row Row value of the slot that user wants to go. @param col Column value of the slot that user wants to go. @return boolean to specify if the move is val

(int yRow, int yCol, int row, int col)

Source from the content-addressed store, hash-verified

555 * @return boolean to specify if the move is valid.
556 */
557 public boolean is_valid_up(int yRow, int yCol, int row, int col){
558 if (yRow-2 < 0) return false;
559 return ((yRow-2)==row && board[yRow-1][yCol].getBackground() == Color.BLACK && yCol == col) ? true : false;
560 }
561
562 /**
563 * Method to determine if move is valid for the down.

Callers 1

autoOneMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected