[four-in-a-row/KaKnife/four-in-a-row-vala: 6/65] It works mostly now



commit 14c133a4d5acbde7eff7af627fcbef6fdc31feeb
Author: Jacob Humphrey <jacob ryan humphrey gmail com>
Date:   Fri Nov 16 16:43:44 2018 -0600

    It works mostly now

 src/gfx.vala   |  2 +-
 src/main2.vala | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/gfx.vala b/src/gfx.vala
index 5296774..cfe880a 100644
--- a/src/gfx.vala
+++ b/src/gfx.vala
@@ -156,7 +156,7 @@ namespace Gfx{
 
 
        cr.save();
-       //gdk_cairo_set_source_pixbuf (cr, pb_tileset, x - os, y);
+       Gdk.cairo_set_source_pixbuf (cr, pb_tileset, x - os, y);
        cr.rectangle (x, y, tilesize, tilesize);
 
        cr.clip();
diff --git a/src/main2.vala b/src/main2.vala
index a82e123..116a538 100644
--- a/src/main2.vala
+++ b/src/main2.vala
@@ -283,20 +283,20 @@ void drop () {
 }
 
 void move (int c) {
-  gboard[0, column] = Tile.CLEAR;
-  Gfx.draw_tile (0, column);
+       gboard[0, column] = Tile.CLEAR;
+       Gfx.draw_tile (0, column);
 
-  column = c;
-  gboard[0, c] = player == PlayerID.PLAYER1 ? Tile.PLAYER1 : Tile.PLAYER2;
+       column = c;
+       gboard[0, c] = player == PlayerID.PLAYER1 ? Tile.PLAYER1 : Tile.PLAYER2;
 
-  Gfx.draw_tile (0, c);
+       Gfx.draw_tile (0, c);
 }
 
 static void move_cursor (int c)
 {
-  move (c);
-  column = column_moveto = c;
-  row = row_dropto = 0;
+       move (c);
+       column = column_moveto = c;
+       row = row_dropto = 0;
 }
 
 void swap_player ()
@@ -568,8 +568,8 @@ void process_move (int c)
 
        column_moveto = c;
        anim = AnimID.MOVE;
-       //Timeout.add(SPEED_DROP, on_animate, c.to_pointer());
-       //timeout = g_timeout_add (SPEED_MOVE, (GSourceFunc) on_animate, GINT_TO_POINTER (c));
+       var temp = new Animate(c);
+       timeout = Timeout.add(SPEED_DROP, temp.exec);
 }
 
 void on_help_about (SimpleAction action, Variant? parameter)


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