danieldesira / TurtleQuest

https://turtle-quest.vercel.app/
Creative Commons Attribution 4.0 International
0 stars 0 forks source link

Eliminate character boolean fields #6

Closed danieldesira closed 8 months ago

danieldesira commented 8 months ago
  1. Eliminate character boolean fields
  2. Create abstract and interfaces folder under characters
  3. Create interface IMainCharacter.ts and declare methods unique to Turtle class
danieldesira commented 8 months ago

Need to delete _isSolitary field next. Probably, the best approach would be to declare a new abstract class named PackPrey with custom logic for initial positioning and swimming, which could then be extended by the Sardine class and any other future characters of this kind.

danieldesira commented 8 months ago

Refactoring complete.

danieldesira commented 8 months ago

We can improve this further as some properties that are declared in characters are not required for that specific character type.

danieldesira commented 8 months ago

Should be able to merge this with master and close the ticket safely.