[gnome-chess] Coding guideline fixes
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Coding guideline fixes
- Date: Tue, 21 Oct 2014 17:55:12 +0000 (UTC)
commit c13ae48cf13cc0d25a67cca05e51e5ff2765bcac
Author: Sahil Sareen <sahil sareen hotmail com>
Date: Tue Oct 21 16:13:02 2014 +0530
Coding guideline fixes
Cleanup of chess code
https://bugzilla.gnome.org/show_bug.cgi?id=738918
src/chess-engine-cecp.vala | 6 +++---
src/chess-engine.vala | 2 +-
src/chess-scene.vala | 2 +-
src/chess-view.vala | 4 ++--
src/gnome-chess.vala | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/chess-engine-cecp.vala b/src/chess-engine-cecp.vala
index b636e6a..ac6a437 100644
--- a/src/chess-engine-cecp.vala
+++ b/src/chess-engine-cecp.vala
@@ -62,13 +62,13 @@ public class ChessEngineCECP : ChessEngine
string move = line[prefix.length:line.length];
debug ("Engine moves %s", move);
moving = true;
- moved (move.strip());
+ moved (move.strip ());
}
}
if (line == "resign" || line == "tellics resign" ||
- (line.has_prefix ("1-0 {") && line.contains("resign")) ||
- (line.has_prefix ("0-1 {") && line.contains("resign")))
+ (line.has_prefix ("1-0 {") && line.contains ("resign")) ||
+ (line.has_prefix ("0-1 {") && line.contains ("resign")))
{
resigned ();
}
diff --git a/src/chess-engine.vala b/src/chess-engine.vala
index 3e9be02..87083bc 100644
--- a/src/chess-engine.vala
+++ b/src/chess-engine.vala
@@ -208,7 +208,7 @@ public abstract class ChessEngine : Object
do
{
- n_written = Posix.write(stdin_fd, &data[offset], data.length - offset);
+ n_written = Posix.write (stdin_fd, &data[offset], data.length - offset);
offset += n_written;
} while (n_written > 0 && offset < data.length);
}
diff --git a/src/chess-scene.vala b/src/chess-scene.vala
index a508ed4..08a173a 100644
--- a/src/chess-scene.vala
+++ b/src/chess-scene.vala
@@ -234,7 +234,7 @@ public class ChessScene : Object
selected_file, rank, file, true, promotion_selection);
selected_rank = selected_file = -1;
}
- if (game.current_player.move_with_coords(selected_rank, selected_file, rank, file))
+ if (game.current_player.move_with_coords (selected_rank, selected_file, rank, file))
selected_rank = selected_file = -1;
}
diff --git a/src/chess-view.vala b/src/chess-view.vala
index a8f3f29..d1e3780 100644
--- a/src/chess-view.vala
+++ b/src/chess-view.vala
@@ -276,8 +276,8 @@ public class ChessView : Gtk.DrawingArea
if (scene.game == null || event.button != 1 || scene.game.should_show_paused_overlay)
return false;
- int file = (int) Math.floor((event.x - 0.5 * get_allocated_width () + square_size * 4) /
square_size);
- int rank = 7 - (int) Math.floor((event.y - 0.5 * get_allocated_height () + square_size * 4) /
square_size);
+ int file = (int) Math.floor ((event.x - 0.5 * get_allocated_width () + square_size * 4) /
square_size);
+ int rank = 7 - (int) Math.floor ((event.y - 0.5 * get_allocated_height () + square_size * 4) /
square_size);
// FIXME: Use proper Cairo rotation matrix
if (scene.board_angle == 180.0)
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index c7f1063..86d6664 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -196,7 +196,7 @@ public class ChessApplication : Gtk.Application
add_window (window);
scene = new ChessScene ();
- scene.is_human.connect ((p) => { return p == human_player; } );
+ scene.is_human.connect ((p) => { return p == human_player; });
scene.changed.connect (scene_changed_cb);
scene.choose_promotion_type.connect (show_promotion_type_selector);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]