Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlarose committed Jan 12, 2014
1 parent 2817932 commit 558a47b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion board.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Board.prototype.create_board = function(size) {
* Switches the current player
*/
Board.prototype.switch_player = function() {
this.current_color = this.current_color == Board.BLACK ? Board.WHITE : Board.BLACK;
this.current_color =
this.current_color == Board.BLACK ? Board.WHITE : Board.BLACK;
};

/*
Expand Down
11 changes: 7 additions & 4 deletions go.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ var BoardIntersection = React.createClass({

var classes = "intersection";
if (this.props.color != Board.EMPTY)
classes += " " + (this.props.color == Board.BLACK ? "black" : "white");
classes += this.props.color == Board.BLACK ? " black" : " white";

return (
<div onClick={this.handleClick} className={classes} style={style}></div>
<div onClick={this.handleClick}
className={classes} style={style}></div>
);
}
});
Expand Down Expand Up @@ -62,7 +63,8 @@ var PassView = React.createClass({
},
render: function() {
return (
<input id="pass-btn" type="button" value="Pass" onClick={this.handleClick} />
<input id="pass-btn" type="button" value="Pass"
onClick={this.handleClick} />
);
}
});
Expand All @@ -81,7 +83,8 @@ var ContainerView = React.createClass({
<div>
<AlertView board={this.state.board} />
<PassView board={this.state.board} />
<BoardView board={this.state.board} onPlay={this.onBoardUpdate.bind(this)} />
<BoardView board={this.state.board}
onPlay={this.onBoardUpdate.bind(this)} />
</div>
)
}
Expand Down

0 comments on commit 558a47b

Please sign in to comment.