From a1942c8cfebd7c850e2cc3ecf94aa6dd8039409f Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 1 Feb 2018 15:47:44 +0100 Subject: Add stage controller and Updateable interface Signed-off-by: pacien --- src/docs/class.puml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/docs') diff --git a/src/docs/class.puml b/src/docs/class.puml index b404102..dfbf5f8 100644 --- a/src/docs/class.puml +++ b/src/docs/class.puml @@ -23,6 +23,11 @@ package viewer { } package context { + interface Updateable { + List update(Context) + static List updateAll(List, Context) + } + class Context { Context(Game,List,GraphicsContext) Game getGame() @@ -52,7 +57,7 @@ package context { GraphicsContext clearScreen() } - class Game { + class Game implements Updateable { Stage final List int indexBoard @@ -91,7 +96,6 @@ package event { class ConfirmEvent implements InputEvent class GameOverEvent implements Event - class ExplosionEvent implements GameEvent { Block source Body source @@ -161,7 +165,7 @@ package block { Block build(BlockType, TileVec2) } - abstract class Block { + abstract class Block implements Updateable { BlockType List Vec2 @@ -180,10 +184,11 @@ package block { class GarbageBlock extends Block class RobotBlock extends Block - class Stage { + class Stage implements Updateable { List Board Stage(Board) + Board getBoard() List getBlocks() List update(Context) bool isCleared() @@ -191,9 +196,7 @@ package block { } package controller { - interface Controller { - List update(Context) - } + interface Controller extends Updateable abstract class BlockController implements Controller { Block -- cgit v1.2.3