From a5e66cf68bec4e01161b83d65b65983260cea7ba Mon Sep 17 00:00:00 2001 From: James Turk Date: Fri, 26 Apr 2024 16:13:10 -0500 Subject: [PATCH] improve readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f1494ae..f8444a0 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ This application is meant to create small animations/sketches. `main.py` contains the core application code, but is the least relevant to the design. -```mermaidjs +```mermaid erDiagram Doodle ||--o| Doodle : parent Group ||--o{ Doodle : has-many @@ -105,7 +105,7 @@ implementation, and then adding their own random elements. (See `lines.py random` for a bit more discussion of this.) -*Liskov Substitution* +### Liskov Substitution Anywhere that the underlying code expects a `Drawable` it should be possible to substitute any child class `Line`, `Rectangle`, etc. @@ -113,7 +113,7 @@ to substitute any child class `Line`, `Rectangle`, etc. This is ensured by having all of them define a common `draw` interface, and having their constructors not take dozens of additional parameters. (See `Line.__init__`.) -*Interface Segregation* +### Interface Segregation This is largely given by counter-example, the principle here states that we must not force child classes to implement methods they do not use. @@ -122,7 +122,7 @@ A counter-example to this would be if the pre-render, then draw dance that compl One could imagine having placed this logic at the `Doodle` class instead of `Line`. That would mean that `Circle`, `Rectangle`, etc. would need to implement a (likely empty) method to fulfill this. -*Dependency Inversion* +### Dependency Inversion Entities should depend on abstractions, not concrete implementations.