Fixed nbodies sample to use attr_accessor