[four-in-a-row] Code convention fixes
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [four-in-a-row] Code convention fixes
- Date: Tue, 21 Oct 2014 17:53:50 +0000 (UTC)
commit 97217f60928c4a14c297e3ee8b1dc20f1ad0f1d0
Author: Sahil Sareen <sahil sareen hotmail com>
Date: Tue Oct 21 16:48:43 2014 +0530
Code convention fixes
Code cleanup as per gnome coding guidelines
https://bugzilla.gnome.org/show_bug.cgi?id=738922
src/test-ai.vala | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/test-ai.vala b/src/test-ai.vala
index f3ff4c1..49bde72 100644
--- a/src/test-ai.vala
+++ b/src/test-ai.vala
@@ -133,17 +133,17 @@ private int test_ai_vs_ai (string easier, string harder)
for (int i = 0; i < NUMBER_GAMES; i++)
{
- var e = new StringBuilder();
- e.append(easier);
+ var e = new StringBuilder ();
+ e.append (easier);
- var m = new StringBuilder();
- m.append(harder);
+ var m = new StringBuilder ();
+ m.append (harder);
while (true)
{
int move;
- DecisionTree t = new DecisionTree();
- move = t.playandcheck(e.str);
+ DecisionTree t = new DecisionTree ();
+ move = t.playandcheck (e.str);
if (move == 0)
{
draw++;
@@ -156,11 +156,11 @@ private int test_ai_vs_ai (string easier, string harder)
break;
}
- e.insert(e.str.length - 1, move.to_string());
- m.insert(m.str.length - 1, move.to_string());
+ e.insert (e.str.length - 1, move.to_string ());
+ m.insert (m.str.length - 1, move.to_string ());
- DecisionTree d = new DecisionTree();
- move = d.playandcheck(m.str);
+ DecisionTree d = new DecisionTree ();
+ move = d.playandcheck (m.str);
if (move == 0)
{
@@ -173,8 +173,8 @@ private int test_ai_vs_ai (string easier, string harder)
harder_wins++;
break;
}
- e.insert(e.str.length - 1, move.to_string());
- m.insert(m.str.length - 1, move.to_string());
+ e.insert (e.str.length - 1, move.to_string ());
+ m.insert (m.str.length - 1, move.to_string ());
}
}
return easier_wins;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]