package ru.job4j.loop;
/**
* Class for paint ChessBoard.
*/
public class Board {
    /**
    * @param width - chessboard width.
    * @param height - chessboard height.
    * @return result - filled chessboard.
    */
    public String paint(int width, int height) {
	if (width > 0 && height > 0) {
	    StringBuilder sb = new StringBuilder();
	    for (int y = 0; y < height; y++) {
		for (int x = 0; x < width; x++) {
		    if (y == 0 || y % 2 == 0) {
			if (y + x % 2 == 0) {
			    sb.append("X");
			} else {
			    sb.append(" ");
			}
		    }
		}
		sb.append("\n");
	    }
	    return sb.toString();
	}
	return " ";
    }
}
@@ -427,44 +427,15 @@
 if (
-y == 0 %7C%7C y %25 2 == 0) %7B%0A%09%09%09if 
 (y + x
+)
  %25 2
@@ -442,28 +442,24 @@
  == 0) %7B%0A%09%09%09
-    
 sb.append(%22X
@@ -464,17 +464,20 @@
 %22X%22);%0A%09%09
-%09
+    
 %7D else %7B
@@ -479,17 +479,20 @@
 lse %7B%0A%09%09
-%09
+    
     sb.a
@@ -507,13 +507,8 @@
 %22);%0A
-%09%09%09%7D%0A
 %09%09  

make changes in class Board.java, task [#17526]