Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by Love ( 9 years ago )
protected void addPositionsInDirection(
      int rowOffset, int columnOffset, Set<Position> positionSet) {
    Position position = this.position.offset(rowOffset, columnOffset);
    while (board.isInsideBounds(position)) {
      if (!board.isEmpty(position)) {
        if (isEnemy(position)) {
          positionSet.add(position);
        }
        break;
      }
      positionSet.add(position);
      position = position.offset(rowOffset, columnOffset);
    }
  }

 

Revise this Paste

Your Name: Code Language: