Skip to content

Commit

Permalink
8147967: Cleanup whitespace and file permission
Browse files Browse the repository at this point in the history
Reviewed-by: ddhill, ckyang
  • Loading branch information
kevinrushforth committed Jan 22, 2016
1 parent dd1581d commit c4497c1
Show file tree
Hide file tree
Showing 8,414 changed files with 156,114 additions and 156,114 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public boolean hasPiecedMoved(Point from) {
public Piece getPiece(Point p) {
return squares[p.getX()][p.getY()].getPiece();
}

public boolean hasPiece(Point p) {
return squares[p.getX()][p.getY()].getPiece() != null;
}
Expand Down Expand Up @@ -274,7 +274,7 @@ public void clear() {
public void setPiece(Piece piece, Point p) {
final Square sq = squares[p.getX()][p.getY()];
sq.setPiece(piece);

// Keep track of the kings
if (piece == WHITE_KING && whiteKing != sq) {
whiteKing.setPiece(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String toString() {
public King getKing() {
return Piece.BLACK_KING;
}

@Override
public Queen getQueen() {
return Piece.BLACK_QUEEN;
Expand All @@ -91,11 +91,11 @@ public Color getOpponentColor() {
@Override
public String toString() {
return "B";
}
}
};

public abstract King getKing();

public abstract Queen getQueen();

public abstract Bishop getBishop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ public enum State {
DRAW("Game ended by draw"),
WHITE_WINS("White player wins"),
BLACK_WINS("Black player wins");

private String msg;

State(String msg) {
this.msg = msg;
}

@Override
public String toString() {
return msg;
Expand Down Expand Up @@ -558,7 +558,7 @@ public synchronized Move makeMove(Color color, Point from, Point to) throws Game

// Update timestamp
updateStamp = System.currentTimeMillis();

return move;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static enum ErrorCode {
ILLEGAL_MOVE(400),
ILLEGAL_MOVE_KING_CHECK(500),
GAME_OVER(600);

int code;

ErrorCode(int code) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public enum Type {
};

private Point from;

private Point to;

private Piece piece;

private Piece captured;

private boolean promoted;
Expand Down Expand Up @@ -88,7 +88,7 @@ public void setPiece(Piece piece) {
public Color getColor() {
return piece.getColor();
}

public Piece getCaptured() {
return captured;
}
Expand Down Expand Up @@ -144,11 +144,11 @@ public boolean isLeftCastling() {
}

public boolean isRightCastling() {
return (piece == Piece.WHITE_KING
&& from.equals(King.W_START_CASTLING)
return (piece == Piece.WHITE_KING
&& from.equals(King.W_START_CASTLING)
&& to.equals(King.W_START_CASTLING.incrementX(2))) ||
(piece == Piece.BLACK_KING
&& from.equals(King.B_START_CASTLING)
(piece == Piece.BLACK_KING
&& from.equals(King.B_START_CASTLING)
&& to.equals(King.B_START_CASTLING.incrementX(2)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public abstract class Piece {

public static final Queen WHITE_QUEEN = new Queen(Color.W);
public static final Queen BLACK_QUEEN = new Queen(Color.B);

protected Color color;

protected Piece(Color color) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Point decrementY(int delta) {
public Point incrementY(int delta) {
return fromXY(x, y + delta);
}

@Override
public int hashCode() {
return y * 8 + x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class Rook extends Piece {
protected Rook(Color color) {
super(color);
}

@Override
public boolean isValidMove(int x1, int y1, int x2, int y2) {
if (!super.isValidMove(x1, y1, x2, y2)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class Square {
public Square(int x, int y) {
this(x, y, null);
}

public Square(int x, int y, Piece piece) {
point = new Point(x, y);
this.piece = piece;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class CreateGame extends Message {

public CreateGame() {
}

public CreateGame(String gameId, Color color) {
this(gameId, color, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public abstract class GameRsp extends MessageRsp {

public GameRsp() {
}

public GameRsp(String gameId) {
super(gameId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public boolean isReplay() {
public void setReplay(boolean replay) {
this.replay = replay;
}

@Override
public Message processMe(ServerMessageProcessor processor) {
return processor.process(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
public class JoinGameRsp extends GameRsp {

private List<String> moves;

public JoinGameRsp() {
}

public JoinGameRsp(String gameId) {
super(gameId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ public abstract class Message {
}

protected String msg;

protected String gameId;

protected Color color;

private String username;

private String password;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static enum AlertType {
};

public static class Alert {

private AlertType type;
private String message;

Expand Down Expand Up @@ -96,7 +96,7 @@ public void setMessage(String message) {
this.message = message;
}
}

private Error error;

private Alert alert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public List<String> getMoves() {
public void setMoves(List<String> moves) {
this.moves = moves;
}

public void addMove(String move) {
if (moves == null) {
moves = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class QueryGamesRsp extends MessageRsp {

public static class Game {

private String gameId;

private String summary;
Expand Down Expand Up @@ -112,7 +112,7 @@ public void addGame(Game game) {
}
games.add(game);
}

public List<Game> getGames() {
return games;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public QueryMovesRsp() {
public QueryMovesRsp(String gameId) {
super(gameId);
}

public QueryMovesRsp(List<String> moves) {
this.moves = moves;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public SendActionRsp() {
public SendActionRsp(String gameId) {
super(gameId);
}

public Type getType() {
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class SendMove extends Message {

public SendMove() {
}

public SendMove(String gameId) {
super(gameId);
}
Expand Down Expand Up @@ -67,7 +67,7 @@ public String getPiece() {
public void setPiece(String piece) {
this.piece = piece;
}

@Override
public Message processMe(ServerMessageProcessor processor) {
return processor.process(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class SendMoveRsp extends MessageRsp {

public SendMoveRsp() {
}

public SendMoveRsp(String gameId) {
super(gameId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ public interface ServerMessageProcessor {
public Message process(SendActionRsp message);

public Message process(CheckCredentials message);

}
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ public class ConferenceScheduleApp extends Application {
@Override public void start(Stage stage) throws Exception {
INSTANCE = this;
if(IS_TESTING_MODE) System.out.println("==============================================\n WARNING: IN TEST MODE\n==============================================");

// create data service
dataService = IS_TESTING_MODE ? new TestDataService() : new DevoxxDataService(7);

centralPopover = new Popover();
centralPopover.setPrefWidth(400);
lightBox = new AutoLogoutLightBox(dataService);
lightBox.setVisible(false);
keyboard = new VirtualKeyboard();
loginLogoutButton = new ToggleButton();

// calculate window size
final double width = IS_BEAGLE ? Screen.getMainScreen().getWidth() : 1024;
final double height = IS_BEAGLE ? Screen.getMainScreen().getHeight(): 600;
Expand Down Expand Up @@ -182,7 +182,7 @@ public class ConferenceScheduleApp extends Application {

// create login screen
loginScreen = new LoginScreen(dataService, height < 1000);

// create root
root = new StackPane() {
@Override protected void layoutChildren() {
Expand Down Expand Up @@ -332,7 +332,7 @@ public void showLoginScreen() {

loginLogoutAnimation = new Timeline(
new KeyFrame(
Duration.millis(800),
Duration.millis(800),
new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent event) {
pageContainer.setVisible(false);
Expand All @@ -346,7 +346,7 @@ public void showLoginScreen() {
);
loginLogoutAnimation.play();
}

public void hideLoginScreen() {
final boolean isGuest = SESSION_MANAGEMENT.isGuestProperty().get();
pageContainer.gotoPage(isGuest ? CATALOG_PAGE : TIMELINE_PAGE, false);
Expand All @@ -360,7 +360,7 @@ public void hideLoginScreen() {

loginLogoutAnimation = new Timeline(
new KeyFrame(
Duration.millis(800),
Duration.millis(800),
new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent event) {
loginScreen.setVisible(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import com.javafx.experiments.scheduleapp.data.DataService;

public abstract class Page extends Region {

private final String name;
protected final DataService dataService;

Expand All @@ -51,7 +51,7 @@ public Page(String name, DataService dataService) {
public String getName() {
return name;
}

public void pageTabClicked() {
}

Expand Down
Loading

0 comments on commit c4497c1

Please sign in to comment.