RandomImage constructor
RandomImage(
- ImageType type
Implementation
RandomImage(this.type) {
switch (type) {
case ImageType.BOAT:
_max = 18;
break;
case ImageType.FOREST:
_max = 10;
break;
case ImageType.BULRUSH:
_max = 12;
break;
case ImageType.RIVER:
_max = 21;
break;
case ImageType.LANDING:
_max = 8;
break;
case ImageType.CAMP:
_max = 15;
break;
default:
throw "Type ${this.type} was not recognized by RandomImage";
}
_currentRandom = _random.nextInt(_max!);
_usedRandomNumbers = [_currentRandom];
}