Iteration 5: Test Stub and Abstract Factory

Deadline

At 23.59 on the day that your class has agreed with the TA.

Any late hand-in must be agreed with your TA; failing to do so will allow the TA to reject evaluating your hand-in.

Workload Estimate

Medium

Learning Goals

In this iteration, the learning goals are using test doubles to get "randomness" under automated test control; and applying the Abstract Factory pattern.

Prerequisites

Carefully read FRS § 37.4.2 which outlines the EpsilonStone variant.

Exercises

EpsilonStone

Develop the EpsilonStone variant using a compositional approach by refactoring the existing HotStone production code. As much production code as possible must be under automated testing control.

Abstract Factory

Refactor your present HotStone design to use Abstract Factory for creating delegates (like strategies for winner determination, mana production, deck building, hero powers etc). All your existing variants, Alpha, Beta, ..., should be represented by concrete factories.

Notes

Drawing the full Abstract Factory UML diagram leads to way too many UML association lines---essentially making the diagram look like spaghetti. UML should provide clarity and overview, not a mess. So, do not draw the lines from factories to the individual concrete products (the strategies)---this is information that a developer (knowning the Abstract Factory pattern) will find in a configuration table or in the code instead.

Deliveries:

  1. Develop on a feature branch "iteration5". (You can of course make sub branches for the individual exercises, if you want).
  2. You should document your group's work by following the more detailed requirements defined in the iteration5 report template (pdf) (LaTeX source)

Evaluation criteria

Your submission is evaluated against the learning goals and adherence to the submission guidelines. The grading is explained in Grading Guidelines. The TAs will use the Iteration 5 Grade sheet to evaluate your submission.

Learning Goal Assessment parameters
Submission Git repository contains an "iteration5"" branch that is merged into main/master branch. Git repository is not public! Required artefacts (report following the template) must be present.
Test Stub The "randomness" of the 'select minion algorithm' is properly encapsulated in a test stub using a compositional design. JUnit test cases for EpsilonStone and/or hero power methods are deterministic and correct. The design is clearly and correctly documented in the report.
Abstract Factory Pattern The abstract factory pattern is correctly designed and implemented, and well documented in the report.
UML The UML diagrams are syntactically correct, correctly reflects the patterns/doubles, and is a correct overview of the architecture. The UML diagram does not show irrelevant implementation oriented details.
TDD and Clean Code TDD process has been applied. Test code and Production code keeps obeying the criteria set forth in the previous iterations, including adhering to Clean Code properties for newly developed code. Missing features are noted in the backlog (Minor omissions allowed).