Software design
[Singleton v.s. Static] You are producing a mobile game that allows both single player gameplayer and networked multiplayer gameplay. Your team is debating how you should approach the NetworkController, which is a single point of control for the game's network connections and traffic. The language you are using is C#.
Please analyze the advantages and disadvantages of the two design choices. Make intelligent assumptions where necessary. Which one would you vote on, and why?
I would suggest to go with singleton pattern.
Because in case of static class we cannot make instance of it which would be required in network multiplayer gameplay .Incase of singleton we can make a single instance but incase of network multiplayer gameplay a singleton class can be extended with the help of an interface.Singleton object can be passed to methods whereas incase of static class it cant be done.
Singleton is able to implement interfaces
Singleton can inherit from other classes
Singleton is more flexible than static and singleton can maintain its state
Software design [Singleton v.s. Static] You are producing a mobile game that allows both single player...