Skip to content
Browse files

bugfix: now the user cant select an empty square

  • Loading branch information...
1 parent 44c03a2 commit 716b942dbe1b47c4290414b6ba31605b0c2d7d7a @scrooloose committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 views/board_renderer.rb
View
2 views/board_renderer.rb
@@ -102,7 +102,7 @@ def kill_main_loop
def square_selected
if @selected_square.nil?
- @selected_square = @current_square
+ @selected_square = @current_square if @board.piece_for(@current_square)
else
begin
@board.piece_for(@selected_square).move_to(@current_square)

0 comments on commit 716b942

Please sign in to comment.
Something went wrong with that request. Please try again.