lib/reversi/player/base_player.rb
# Returns a hash containing the coordinates of each color.
#
# @return [Hash{Symbol => Array<Integer, Integer>}]
Returns a hash containing the coordinates of each color.
Returns a hash containing the coordinates of each color .
def status
      convert = {
        :black => @my_color == Reversi::Board::DISK[:black] ? :mine : :opponent,
        :white => @my_color == Reversi::Board::DISK[:white] ? :mine : :opponent,
        :none  => :none }
      Hash[*@board.status.map{ |k, v| [convert[k], v] }.flatten(1)]
    end
def status convert = { :black => @my_color == Reversi :: Board :: DISK [ :black ] ? :mine : :opponent , :white => @my_color == Reversi :: Board :: DISK [ :white ] ? :mine : :opponent , :none => :none } Hash [ * @board . status . map { | k , v | [ convert [ k ] , v ] } . flatten ( 1 ) ] end
Returns a hash containing the coordinates of each color.
Returns a hash containing the coordinates of each color .
None
Hash{Symbol => Array<Integer, Integer>}