소스 검색

Add explanation of code snippet

Sam Jaffe 6 년 전
부모
커밋
9ede705d53
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      README.md

+ 6 - 3
README.md

@@ -15,9 +15,9 @@ This is a useful construct in the situation where you have a large number of fix
 ### Steps
 
 1. Download or clone this repository.
-2. Open a console window in the directory
-3. `mvn install`
-4. Add the below block to your pom.xml
+2. Open a console window in the directory.
+3. Run `mvn install`
+4. Add the below maven artifact to your pom.xml
 
 ### Maven Artifact
 ``` xml
@@ -30,6 +30,9 @@ This is a useful construct in the situation where you have a large number of fix
 
 ### ObservableListener
 
+In the following hypothetical, imagine a spellbook that allows you to only cast N spells each day. We have a GUI setup that shows up the spells we can cast and the number of spells left, but the interface does not have the ability to edit things. An example would be a text-based interaction system like Zork, but with an active display for user ease.  
+The player then types `cast Fireball` into the prompt, and automatically the spellbook window to the left decrements the spells remaining interface.
+
 ``` java
     class SpellBook extends Observable {
       int spellSlotsRemaining, maxSpellSlots;