Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/digimortl/tycoon

Exercise 3 of Transport Tycoon Exercises for DDD
https://github.com/digimortl/tycoon

bluebook ddd event-driven-simulation go golang simulation smalltalk squeak

Last synced: about 2 months ago
JSON representation

Exercise 3 of Transport Tycoon Exercises for DDD

Awesome Lists containing this project

README

        

Transport Tycoon Exercises for DDD solution (https://github.com/Softwarepark/exercises/blob/master/transport-tycoon.md)

The idea to make use of this approach was brought from Smalltalk "Bluebook"
(http://wiki.squeak.org/squeak/64) -- event-driven simulations. Sorry me for my PEP8!
I violated it intentionally for the sake of respect of this great language.

First usecase (Exercise 1)

A -> 5 hours
AB -> 5 hours
BB -> 5 hours
ABB -> 7 hours
AABABBAB - > 29 hours
ABBBABAAABBB -> 41 hours

Second usecase (Exercise 2)

ABBBABAAABBB -> 39 hours

See ./traces directory to investigate domain events.

How to build/run:

GOROOT=/path/to/sdk/go1.13.5
GOPATH=/path/to/workspace
${GOROOT}/go build -o ${GOPATH}/bin/tycoon
${GOPATH}/bin/tycoon exercise-2 ABBBABAAABBB

How to test:

GOROOT=/path/to/sdk/go1.13.5
GOPATH=/path/to/workspace
${GOROOT}/go test -c -o /tmp/usecase_test_go github.com/digimortl/tycoon
${GOROOT}/go tool test2json -t /tmp/usecase_test_go -test.v -test.run "^TestUseCase1|TestUseCase2$"