Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
509 B
20 lines
509 B
package org.openrs2.deob.remap
|
|
|
|
public class StaticClassGenerator(private val generator: NameGenerator, private val maxMembers: Int) {
|
|
private var lastClass: String? = null
|
|
private var members = 0
|
|
|
|
public fun generate(): String {
|
|
var clazz = lastClass
|
|
|
|
if (clazz == null || members >= maxMembers) {
|
|
clazz = generator.generate("Static")
|
|
lastClass = clazz
|
|
members = 1
|
|
} else {
|
|
members++
|
|
}
|
|
|
|
return clazz
|
|
}
|
|
}
|
|
|