Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
agiledragon committed Sep 7, 2018
1 parent 013d0b7 commit 88a2c53
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# ddd-sample-in-golang
# DDD sample

ddd sample

### cargo

DDD sample with OO

## counting shapes

DDD sample with FP

![](shapes.png)

### counting triangles
How many triangles can you see?
24, details as follows:
[abc abd abe acd ace ade aef aeg aeh afg afh agh ahi ahj ahk aij aik ajk beh ceg def ehk fhj ghi]

### counting quadrangles
How many quadrangles can you see?
18, details as follows:
[aceh adeg adeh afhk aghj aghk bcgh bcih bdfh bdjh bekh cdfg cdji ceki dekj efjk egik fgij]
3 changes: 2 additions & 1 deletion counting-shapes/domain/service/counting_shapes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package service
import (
"github.com/agiledragon/ddd-sample-in-golang/counting-shapes/domain/model"
// "fmt"
"fmt"
)

func CountingTriangles(points model.Points, lines []model.Line) []model.Points {
Expand All @@ -13,7 +14,7 @@ func CountingTriangles(points model.Points, lines []model.Line) []model.Points {
matches = append(matches, set)
}
}
//fmt.Println("matches:", matches)
fmt.Println("matches:", matches)
return matches
}

Expand Down
Binary file added shapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 88a2c53

Please sign in to comment.