Platform Independend Newlines
Java uses %n for platform independend newlines
\r\n on windows, \n on linux and so on...
--- a/org/homelinux/largo/checkers/Checkers.java
+++ b/org/homelinux/largo/checkers/Checkers.java
@@ -142,7 +142,7 @@
if (board.simu_debug()) {
for (int i=0;i<64;i++) {
if((i+1)%8 == 0 )
- System.err.printf("%2d=%d\n", i, board.getValue(i));
+ System.err.printf("%2d=%d%n", i, board.getValue(i));
else
System.err.printf("%2d=%d ", i, board.getValue(i));
}
@@ -198,7 +198,7 @@
if (board.simu_debug()) {
for (int i=0;i<64;i++) {
if((i+1)%8 == 0 )
- System.out.printf("%2d=%d\n", i, board.getValue(i));
+ System.out.printf("%2d=%d%n", i, board.getValue(i));
else
System.out.printf("%2d=%d ", i, board.getValue(i));
}
--- a/org/homelinux/largo/games/board/chessboard/ChessBoard.java
+++ b/org/homelinux/largo/games/board/chessboard/ChessBoard.java
@@ -23,7 +23,7 @@
final Piece white_queen = new Piece(new ImgComponent("images/white_queen.png").getImage(),
"white", QUEEN, 90);
- final Piece black_queen = new Piece(new ImgComponent("images/black_queen.png").getImage(),
+ final Piece black_queen = new Piece(new ImgComponent("images/black_queen.png").getImage(),
"black", QUEEN, 90);
boolean white_rochades_small;
@@ -617,7 +617,7 @@
if(isWhite(o) && t <=7)
setPiece(o, new Piece(white_queen));
}
-
+
setPiece(t, new Piece(getPiece(o)));
setPiece(o, new Piece(null, null, EMPTY, 0));
@@ -652,7 +652,7 @@
row2 = t/8;
col2 = t-(8*row2);
- System.out.printf("%s: %C%d-%c%d = %3d\n", s,
+ System.out.printf("%s: %C%d-%c%d = %3d%n", s,
('A')+col1, 8-row1,
('A')+col2, 8-row2, value);
}
--- a/org/homelinux/largo/schach/Schach.java
+++ b/org/homelinux/largo/schach/Schach.java
@@ -142,7 +142,7 @@
if (board.simu_debug()) {
for (int i=0;i<64;i++) {
if((i+1)%8 == 0 )
- System.err.printf("%2d=%d\n", i, board.getValue(i));
+ System.err.printf("%2d=%d%n", i, board.getValue(i));
else
System.err.printf("%2d=%d ", i, board.getValue(i));
}
@@ -198,7 +198,7 @@
if (board.simu_debug()) {
for (int i=0;i<64;i++) {
if((i+1)%8 == 0 )
- System.out.printf("%2d=%d\n", i, board.getValue(i));
+ System.out.printf("%2d=%d%n", i, board.getValue(i));
else
System.out.printf("%2d=%d ", i, board.getValue(i));
}