wkeeling/arkanoid

Separate RoundRestartState and RoundStartState

Closed this issue · 1 comments

Having RoundRestartState extend RoundStartState is becoming a problem as there is too much functionality that is not shared which needs no-op implementations in RoundRestartState.

Refactor to make RoundRestartState extend BaseState directly, and refactor common behaviour into a separate function or class called by both RoundStartState and RoundRestartState. This will also help when the RoundStartState is changed to accept the Round class as only the RoundStartState, not the RoundRestartState, should create a new Round.

Not changed RoundStartState to accept the Round class. Separating the two states as described in this ticket isn't really required now. Closing.