ohthatjames/chess

View on GitHub
lib/chess/rook.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Chess
  class Rook < Piece
    register_as "R"

    def end_squares(from, board)
      offsets = [[0,1], [0, -1], [1, 0], [-1, 0]]
      gather_repeated_offsets(from, board, offsets)
    end
  end
end