I am attempting to simulate a dice roll using the RANDOM class in the BASE library. With my current code, it only ever prints out 5.
class APPLICATION
create make
feature make local random_obj: RANDOM do create random_obj.make io.put_integer (random_obj.next_random (random_obj.item) \ 6 + 1) end
end
Aucun commentaire:
Enregistrer un commentaire