 |
Synthia
Generic and flexible data structure generator
|
Go to the documentation of this file. 1 package ca.uqac.lif.synthia.map;
6 import java.util.ArrayList;
21 this.m_widthPicker = width_picker;
22 this.m_heightPicker = height_picker;
23 this.m_hubsNbPicker = hubs_nb_picker;
24 this.m_xPicker = x_picker;
25 this.m_yPicker = y_picker;
47 return new AreaMap(width,height,generateHubList(hubs_nb));
50 private List<Point> generateHubList(
int hub_nb)
52 List<Point> hubs =
new ArrayList<>();
53 for (
int i = 0; i < hub_nb; i++)
70 public void setSeed(
int x_seed,
int y_seed)
void setSeed(int x_seed, int y_seed)
AreaMapPicker(Picker< Integer > width_picker, Picker< Integer > height_picker, Picker< Integer > hubs_nb_picker, RandomInteger x_picker, RandomInteger y_picker)
Picker< Integer > m_widthPicker
Pickers that produce pseudo-random objects such as numbers.
void reset()
Puts the picker back into its initial state.
Picker< Integer > m_heightPicker
RandomInteger setInterval(int min, int max)
Sets the interval in which integers are picked.
Picker< AreaMap > duplicate(boolean with_state)
Creates a copy of the picker.
void reset()
Puts the picker back into its initial state.
Picker< Integer > m_hubsNbPicker
RandomInteger setSeed(int seed)
Picks an integer uniformly in an interval.
Integer pick()
Picks a random integer.
RandomInteger duplicate(boolean with_state)
Creates a copy of the RandomInteger picker.
AreaMap pick()
Picks an object.
Picker< T > duplicate(boolean with_state)
Creates a copy of the picker.
void reset()
Puts the picker back into its initial state.