Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Robocode でシングルトン パターンを実装しようとしていました。しかし残念なことに、新しいラウンドが開始されるたびに、新しいオブジェクト (シングルトン) が作成されます。
Robocode でシングルトン パターンを使用できるかどうか知っていますか? そうでない場合は、その理由を説明していただけますか?
Robocode は、各ロボットが独自の ClassLoader を介して作成されるように設計されているため、残念ながら、ロボット内以外ではシングルトンは使用できません。