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)
| 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. |