Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: None | Size: 0.33 KB | Hits: 64 | Expires: Never
Copy text to clipboard
  1. public boolean isAdjacentTo(Position other) {
  2.                 // TODO Auto-generated method stub
  3.                 boolean res = false;
  4.                 if (column == other.getColumn() - 1 || column == other.getColumn() + 1
  5.                                 || row == other.getRow() - 1 || row == other.getRow() + 1
  6.                                 && column != other.getColumn() && row != other.getRow())
  7.                         res = true;
  8.                 return res;
  9.         }