public
Fork of scrooloose/chesticles
Description: A chess hax in ruby
Clone URL: git://github.com/halorgium/chesticles.git
Redraw the view on all clicks regardless of whether a valid move was made
halorgium (author)
Sun Mar 09 17:20:46 -0700 2008
commit  f33eeccc067af82e90670df71811c07549b8a136
tree    1f289e032cc89a3e94e0c0936a097f9a7fa8f75d
parent  4d08527218a68949a037579913577fd69598b651
...
74
75
76
77
78
79
80
81
82
83
84
85
 
86
87
88
...
74
75
76
 
77
78
79
 
80
81
82
83
84
85
86
87
0
@@ -74,15 +74,14 @@ class GtkBoardRenderer < Gtk::Window
0
   def square_clicked(square)
0
     if @selected_square.nil?
0
       @selected_square = square if @board.piece_for(square)
0
- queue_draw
0
     else
0
       begin
0
         @board.piece_for(@selected_square).move_to(square)
0
- queue_draw
0
       rescue Piece::IllegalMoveError
0
       end
0
       @selected_square = nil
0
     end
0
+ queue_draw
0
   end
0
 
0
   def pixbuf_for(piece)

Comments

    No one has commented yet.