Add basic randomizer

This commit is contained in:
2025-02-22 13:01:35 -06:00
parent 6bdf0a67cb
commit c9407bd0bf
9 changed files with 127 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
namespace ALttPRandomizer {
using System;
public class IdGenerator {
private const string chars = "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789";
private const int length = 10;
private static Random random = new Random();
public string GenerateId() {
var str = new char[length];
for (int i = 0; i < length; i++) {
str[i] = chars[random.Next(chars.Length)];
}
return new string(str);
}
}
}