Which design pattern is appropriate for “Sea Battle” game objects?

ぐ巨炮叔叔 提交于 2019-12-11 13:19:16

问题


The problems of my design are:

  • I have to copy too many attributes from the interface
  • Static field "count" doesn't work for each of successor.

The field should count for example how many mines are on the game field (approximate diagram).

I am sorry about mistakes. I am a novice and it is my first question here. Thank you for corrections and advices.

来源:https://stackoverflow.com/questions/25154849/which-design-pattern-is-appropriate-for-sea-battle-game-objects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!