@Override
	public void createPossibleMoves() {
		possibleMoves = new ArrayList<Square>();
		//direction boolean is set to false if a piece is blocking the direction
		boolean north = true, south = true, west = true, east = true;

		for(int i = 1; i < ChessEngine.SQUARE_HEIGHT; i++) {
			
			//if no more squares can be valid, break.
			if(!north && !south && !west && !east) break;
			
			/* Check north direction */
			if(north) {
				int dx = x, dy = y;
				//new coordinates for North direction.
				dy -= i;
				north = checkMovableSquare(dx, dy);
			}
			/* Check North-East direction */
			if(south) {
				int dx = x, dy = y;
				//new coordinates for North-East direction
				dy += i;
				south = checkMovableSquare(dx, dy);
			}
			/* Check West direction */
			if(west) {
				int dx = x, dy = y;
				//new coordinates for West direction.
				dx -= i;
				west = checkMovableSquare(dx, dy);
			}
			/* Check South-East direction */
			if(east) {
				int dx = x, dy = y;
				//new coordinates for North-West direction.
				dx += i;
				east = checkMovableSquare(dx, dy);
			}
		}

	}