**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
GuessingGameto pass inmin/maxfrom 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
Printerand 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
Playerand 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, andListenerinterfaces
-
Afternoon Exercises
-
Individual: Write
SerialDispatcherandPrintingListenerimplementations and tests.Solution:
pubsub -
Individual: Model
NumberGameas Events and Listeners
-
Events
- GameStarted
- RoundStarted
- RoundEnded
- GuessCreated
- PlayerDecision
Context
- StartMin
- StartMax
- KnownMax
- KnownMin
- CurrentGuess
- GuessCount