Skip to content

Refactor Robot #38

Description

@mrhead

Robot class is really growing. And I do not like it.

https://github.com/mrhead/ruby_arena/blob/master/lib/robot.rb # right now, it is 198 LOC

Probably we should extract some logic from it and also somehow refactor initialize method.

From beginning there was also Tank class and Robot was composed from Ai, Tank and Command parser. But as soon as I started to adding functionality Tank and Robot became really entangled with a lot of duplication... I did not like it so I've merged Tank into the Robot.

But right now Robot is really big so it needs to be refactored somehow.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions