netbots icon indicating copy to clipboard operation
netbots copied to clipboard

Break netbots_server.py into multiple files

Open dbakewel opened this issue 6 years ago • 1 comments

Is your feature request related to a problem? Please describe. netbots_server.py is over 1000 lines. It has become hard to read through.

Describe the solution you'd like I propose moving the following from netbots_servers.py to their own files:

  • SrvData and argparse into netbots_srvdata.py
  • Message code into netbots_srvmsg.py
  • Step processing into netbots_srvstep.py (The step function should also be broken into multiple functions)

Describe alternatives you've considered We could just leave it the way it is. There is also the option to change everything to objects. Then the there could be one file for each object. However, as long as robots and shells are the only things moving in the arena then objects do not add much value.

dbakewel avatar Jun 07 '19 18:06 dbakewel

I think separating the code in the above fashion would work well, but where would the initializing game code go? (laying out jam zones, obstacles and starting positions) Would that be a part of netbots_srvstep.py or a separate file?

mcstoer avatar Jun 15 '19 21:06 mcstoer