简体   繁体   中英

Singleton pattern in Robocode

I was trying to implement singleton pattern in Robocode. But unfortunately, when new round starts, every time a new object (which is singleton) is created.

Do you know if it is possible to use singleton pattern in Robocode? If not, could you explain me why?

我相信Robocode的设计使每个机器人都可以通过其自己的ClassLoader创建,因此,不幸的是,只有在机器人内部无法实现单例。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM