public Set < Tile > getNeighbours ( ) { Set < Tile > neighbours = new HashSet < Tile > ( 8 ) ; neighbours . add ( getLeft ( ) ) ; neighbours . add ( getAboveLeft ( ) ) ; neighbours . add ( getAbove ( ) ) ; neighbours . add ( getAboveRight ( ) ) ; neighbours . add ( getRight ( ) ) ; neighbours . add ( getBelowRight ( ) ) ; neighbours . add ( getBelow ( ) ) ; neighbours . add ( getBelowLeft ( ) ) ; return neighbours ; }
Returns a set of the eight neighbours of this tile .