These could be combined into one line: p1move = STDIN.noecho(&:gets).chomp