Skip to content

Commit

Permalink
Redraw the view on all clicks regardless of whether a valid move was …
Browse files Browse the repository at this point in the history
…made
  • Loading branch information
halorgium committed Mar 10, 2008
1 parent 4d08527 commit f33eecc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions views/gtk_board_renderer.rb
Expand Up @@ -74,15 +74,14 @@ def draw_board(gc, drawable)
def square_clicked(square)
if @selected_square.nil?
@selected_square = square if @board.piece_for(square)
queue_draw
else
begin
@board.piece_for(@selected_square).move_to(square)
queue_draw
rescue Piece::IllegalMoveError
end
@selected_square = nil
end
queue_draw
end

def pixbuf_for(piece)
Expand Down

0 comments on commit f33eecc

Please sign in to comment.