From 0d545ea6e634ed990dd8f731a24a4e0838ffedbf Mon Sep 17 00:00:00 2001 From: Guillaume Pasquet Date: Wed, 11 Mar 2020 07:35:23 +0000 Subject: stuff --- TODO.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 9289b2d..981e42b 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,23 @@ +# TODO + - Add unit tests - Disassociate level to view, move view around if terminal too small - Add equipment system -- Remove rendering logic from State \ No newline at end of file +- Remove rendering logic from State + + +## Separate rendering logic + +``` +------- --------- +| main| -----> | State | +------- | --------- + | + | ------------ + +-> | ViewPort | + ------------ +``` + +- Main game logic mutates State in reaction to player input +- Render is triggered by giving it a read-only reference to current state +- Heavy use of traits in ViewPort allows multiple type of viewports (Piston etc.) -- cgit v1.2.3