Method: Othello::BoardView#click_square

Defined in:
sample/tcltklib/sample2.rb

#click_square(square) ⇒ Object



324
325
326
327
328
329
330
331
332
333
334
# File 'sample/tcltklib/sample2.rb', line 324

def click_square(square)
   if @othello.in_com_turn || @othello.game_over ||
         @board.count_point(square.row,
                            square.col,
                            @board.man_disk) == 0
      square.blink(STOP_COLOR)
      return
   end
   @board.put_disk(square.row, square.col, @board.man_disk)
   @othello.com_turn
end