[iagno] Make some methods private.



commit d7f57a4ebbe7511e376e4abbd3dc6e752a9a78b5
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Apr 27 14:17:12 2019 +0200

    Make some methods private.

 src/computer-reversi.vala | 4 ++--
 src/game.vala             | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/computer-reversi.vala b/src/computer-reversi.vala
index 8a0667c..f724996 100644
--- a/src/computer-reversi.vala
+++ b/src/computer-reversi.vala
@@ -60,7 +60,7 @@ private class ComputerReversi : ComputerPlayer
     {
         if (!game.place_tile (x, y))
         {
-            critical ("Computer chose an invalid move: %d,%d\n%s", x, y, game.to_string ());
+            critical (@"Computer chose an invalid move: $x,$y\n$game");
 
             /* Has been reached, once. So let's have a fallback. */
             uint8 new_x;
@@ -68,7 +68,7 @@ private class ComputerReversi : ComputerPlayer
             random_select (game.current_state, out new_x, out new_y);
             if (!game.place_tile (new_x, new_y))
             {
-                critical ("Computer chose an invalid move for the second time: %d,%d\n%s", new_x, new_y, 
game.to_string ());
+                critical (@"Computer chose an invalid move for the second time: $new_x,$new_y\n$game");
                 assert_not_reached ();
             }
         }
diff --git a/src/game.vala b/src/game.vala
index 1ceb0a7..d68b6b0 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -135,7 +135,7 @@ private class GameState : Object
     [CCode (notify = false)] internal uint8 n_opponent_tiles
                                             { internal get { return current_color == Player.DARK ? 
_n_light_tiles : _n_dark_tiles; }}
 
-    internal void add_tile_of_color (Player color)
+    private void add_tile_of_color (Player color)
     {
         if (color == Player.DARK)
             _n_dark_tiles++;
@@ -173,7 +173,7 @@ private class GameState : Object
             && y >= 0 && y < size;
     }
 
-    internal inline bool is_valid_location_unsigned (uint8 x, uint8 y)
+    private inline bool is_valid_location_unsigned (uint8 x, uint8 y)
     {
         return x < size && y < size;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]