lib/tak/board.rb
# Returns who the flat winner is, or false if there is none yet
#
# Not a fan of the Bool/Sym response, consider refactor later.
#
# @return [Boolean || Symbol]
Returns who the flat winner is, or false if there is none yet
Not a fan of the Bool/Sym response, consider refactor later.
Returns who the flat winner is or false if there is none yet Not a fan of the Bool / Sym response consider refactor later .
def flat_winner
      return false unless empty_piece_set?
      white_flats, black_flats = flat_counts.values
      case white_flats <=> black_flats
      when  0 then :tie
      when  1 then :white
      when -1 then :black
      end
    end
def flat_winner return false unless empty_piece_set? white_flats , black_flats = flat_counts . values case white_flats <=> black_flats when 0 then :tie when 1 then :white when - 1 then :black end end
Returns who the flat winner is, or false if there is none yet
Not a fan of the Bool/Sym response, consider refactor later.
Returns who the flat winner is or false if there is none yet Not a fan of the Bool / Sym response consider refactor later .
None
Boolean || Symbol