feat: Random.org dice and daily word matrix, interpreter voices, curated lexicon
Wire cleromancy rolls and the once-per-UTC-day 000-999 word shuffle to RANDOM.ORG JSON-RPC, with a local CSPRNG fallback. Add settings for interpreter personas and a cleaner default oracle prompt. Replace proper names and bureaucratic filler in the 1000-word lexicon with sacred symbols.
This commit is contained in:
@@ -12,7 +12,7 @@ void main() {
|
||||
setUp(() async {
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
repo = WordsRepository();
|
||||
await repo.init();
|
||||
await repo.init(remoteDailyShuffle: false);
|
||||
});
|
||||
|
||||
test('Dataset contains exactly 1000 words with unique randomized session numbers 000 to 999', () {
|
||||
@@ -33,14 +33,25 @@ void main() {
|
||||
expect(seenSessionNumbers.length, equals(1000));
|
||||
});
|
||||
|
||||
test('Reshuffling changes the order / mapping of words to session numbers', () {
|
||||
repo.reshuffleSessionNumbers();
|
||||
test('Reshuffling changes the order / mapping of words to session numbers', () async {
|
||||
await repo.reshuffleSessionNumbers();
|
||||
expect(repo.totalWords, equals(1000));
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
expect(repo.getWordBySessionNumber(i)?.sessionNumber, equals(i));
|
||||
}
|
||||
});
|
||||
|
||||
test('Same UTC day reuses the persisted word matrix', () async {
|
||||
final first = [
|
||||
for (int i = 0; i < 8; i++) repo.getWordBySessionNumber(i)!.word,
|
||||
];
|
||||
await repo.init(remoteDailyShuffle: false);
|
||||
expect([
|
||||
for (int i = 0; i < 8; i++) repo.getWordBySessionNumber(i)!.word,
|
||||
], first);
|
||||
expect(repo.dailyMappingDate, WordsRepository.utcDateStamp());
|
||||
});
|
||||
|
||||
test('Search by number string returns correct session word', () {
|
||||
final results0 = repo.search('0');
|
||||
expect(results0.isNotEmpty, isTrue);
|
||||
|
||||
Reference in New Issue
Block a user