Each time you call the save method, the available information in the file is overwritten. Whether prompt the method is written correctly? Perhaps that missed something.
def save(nickname) @code_breakers << Player.new(nickname, @current_try) File.open('result.yaml', 'w') { |file| file.puts(code_breakers.to_yaml) } end