solutions/ominous-omino/ruby/ominous_omino.rb
def testCase(line)
    values = line.split(" ").map(&:to_i)
    xomino = values[0]
    rows = values[1]
    columns = values[2]
    area = rows * columns
    winner = "GABRIEL"

    if xomino>6 || xomino > area || area%xomino >0 || self.perfectPieceExists(xomino,rows,columns)
        winner = "RICHARD"
    end

    winner
  end
#evaluate the case and returs the winner
#params:
# line text line (case to evaluate)
evaluate the case and returs the winner
params:
line text line (case to evaluate)
evaluate the case and returs the winner params : line text line ( case to evaluate )
def testCase(line)
    values = line.split(" ").map(&:to_i)
    xomino = values[0]
    rows = values[1]
    columns = values[2]
    area = rows * columns
    winner = "GABRIEL"
    if xomino>6 || xomino > area || area%xomino >0 || self.perfectPieceExists(xomino,rows,columns)
        winner = "RICHARD"
    end
    winner
  end
def testCase ( line ) values = line . split ( " " ) . map ( & :to_i ) xomino = values [ 0 ] rows = values [ 1 ] columns = values [ 2 ] area = rows * columns winner = "GABRIEL" if xomino > 6 || xomino > area || area % xomino > 0 || self . perfectPieceExists ( xomino , rows , columns ) winner = "RICHARD" end winner end
evaluate the case and returs the winner
params:
line text line (case to evaluate)
evaluate the case and returs the winner params : line text line ( case to evaluate )
line