**Ryan Timmons**
**@rtimmons**
- Welcome and Import Project
git clone https://github.com/rtimmons/c4q-pubsub pubsub
./gradlew test
./gradlew idea
open pubsub.ipr
# Play the game:
./gradlew shadowJar
java -jar build/libs/*.jar
java -jar build/libs/*.jar 50 100
# (control+d to quit)
-
Warmup @done(2017-05-21)
- Individual: Change
GuessingGame
to pass inmin
/max
from command-line @done(2017-05-21)
- Individual: Change
-
Morning New Material: Dependency Injection @done(2017-05-21)
-
Group: Introduce Dependency Injection @done(2017-05-21)
-
Group: Extract
Printer
and inject intoGuessingGame
@done(2017-05-21)Solution:
printer-refactor
-
git stash
git checkout printer-refactor
-
Morning Exercise: Practice DI-Based Refactoring @done(2017-05-21)
-
Individual: Extract
Player
and inject @done(2017-05-21) -
Individual: Add automated testing @done(2017-05-21)
Solution:
player-refactor
-
git stash
git fetch
git checkout lab-player
git stash
git fetch
git checkout player-refactor
-
Mockito
-
Afternoon New Material: PubSub
- Group: Define PubSub together; Why use it?
- Group:
Dispatcher
, andListener
interfaces
-
Afternoon Exercises
-
Individual: Write
SerialDispatcher
andPrintingListener
implementations and tests.Solution:
pubsub
-
Individual: Model
NumberGame
as Events and Listeners
-
Events
- GameStarted
- RoundStarted
- RoundEnded
- GuessCreated
- PlayerDecision
Context
- StartMin
- StartMax
- KnownMax
- KnownMin
- CurrentGuess
- GuessCount