note
	description: "A simple random generator"
	author: "Louis Marchand inspire by Martin Seiler (http://community.eiffel.com/room/article/random_numbers)"
	date: "Sat, 28 Mar 2015 03:24:57 +0000"
	revision: "2.0"

class interface
	GAME_RANDOM

create 
	default_create,
	make_with_seed

feature -- Access

	generate_new_random
			-- Generate a new random number. Use this feature before one of the last_random_* feature.

	last_random_integer: INTEGER_32
			-- Return an integer representation of the last random number generate by the
			-- generate_new_random routine.

	last_random_integer_between (a_min, a_max: INTEGER_32): INTEGER_32
			-- Return an integer representation of the last random number generate by the
			-- generate_new_random routine. The return value will be between min and max
			-- (including a_min and a_max).
		require
			get_random_between_max_and_min_valid: a_max >= a_min
		ensure
			random_value_valid: Result >= a_min and Result <= a_max

	last_random_real: REAL_32
			-- Return an real representation of the last random number generate by the
			-- generate_new_random routine.

	last_random_real_between (a_min, a_max: REAL_32): REAL_32
			-- Return an real representation of the last random number generate by the
			-- generate_new_random routine. The return value will be between min and max
			-- (including a_min and a_max).
		require
			get_random_between_max_and_min_valid: a_max >= a_min
		ensure
			random_value_valid: Result >= a_min and Result <= a_max
	
end -- class GAME_RANDOM

Generated by ISE EiffelStudio