Commits

Richard Bair committed c039f32

Rewriting for fun and profit. Mostly just learning the space and trying a few things out.

Comments (0)

Files changed (46)

.idea/compiler.xml

       <entry name="?*.css" />
       <entry name="?*.bss" />
     </wildcardResourcePatterns>
-    <annotationProcessing enabled="false" useClasspath="true" />
+    <annotationProcessing>
+      <profile default="true" name="Default" enabled="false">
+        <processorPath useClasspath="true" />
+      </profile>
+    </annotationProcessing>
   </component>
 </project>
 

.idea/workspace.xml

     <disable_hints />
   </component>
   <component name="DebuggerManager">
-    <breakpoint_any>
+    <ui_properties default_suspend_policy="SuspendAll" default_condition_enabled="true" />
+    <breakpoint_any default_suspend_policy="SuspendAll" default_condition_enabled="true">
       <breakpoint>
         <option name="NOTIFY_CAUGHT" value="true" />
         <option name="NOTIFY_UNCAUGHT" value="true" />
         <option name="LOG_ENABLED" value="false" />
         <option name="LOG_EXPRESSION_ENABLED" value="false" />
         <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="SUSPEND" value="true" />
         <option name="COUNT_FILTER_ENABLED" value="false" />
         <option name="COUNT_FILTER" value="0" />
         <option name="CONDITION_ENABLED" value="false" />
         <option name="LOG_ENABLED" value="false" />
         <option name="LOG_EXPRESSION_ENABLED" value="false" />
         <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="SUSPEND" value="true" />
         <option name="COUNT_FILTER_ENABLED" value="false" />
         <option name="COUNT_FILTER" value="0" />
         <option name="CONDITION_ENABLED" value="false" />
         <option name="LOG_MESSAGE" value="" />
       </breakpoint>
     </breakpoint_any>
+    <breakpoint_rules default_suspend_policy="SuspendAll" default_condition_enabled="true" />
     <breakpoint_rules />
     <ui_properties />
   </component>
+  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
   <component name="FavoritesManager">
     <favorites_list name="fx-games" />
   </component>
   <component name="FileEditorManager">
-    <leaf>
-      <file leaf-file-name="TowersApplication.java" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/Towers/src/com/fxexperience/games/towers/TowersApplication.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="6" column="3" selection-start="137" selection-end="137" vertical-scroll-proportion="0.07614213">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-    </leaf>
+    <leaf />
   </component>
   <component name="FindManager">
     <FindUsagesManager>
       <sortByType />
     </navigator>
     <panes>
+      <pane id="Scope" />
       <pane id="PackagesPane">
         <subPane />
       </pane>
-      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <PATH>
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
             </PATH_ELEMENT>
           </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="fx-games" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="Towers" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="fx-games" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="Towers" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="src" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="towers" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
         </subPane>
       </pane>
     </panes>
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="MemberChooser.showClasses" value="true" />
     <property name="GoToClass.includeLibraries" value="false" />
+    <property name="options.splitter.details.proportions" value="0.2" />
     <property name="options.searchVisible" value="true" />
-    <property name="options.splitter.details.proportions" value="0.2" />
   </component>
   <component name="RunManager">
     <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
       <module name="" />
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
       <option name="PROGRAM_PARAMETERS" />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="BuildArtifacts" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
+      <method />
     </configuration>
     <configuration default="true" type="Remote" factoryName="Remote">
       <option name="USE_SOCKET_TRANSPORT" value="true" />
       <option name="SHMEM_ADDRESS" value="javadebug" />
       <option name="HOST" value="localhost" />
       <option name="PORT" value="5005" />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="BuildArtifacts" enabled="false" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
+      <method />
     </configuration>
     <configuration default="true" type="Applet" factoryName="Applet">
       <module name="" />
       <option name="VM_PARAMETERS" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <option name="ALTERNATIVE_JRE_PATH" />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="BuildArtifacts" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
+      <method />
     </configuration>
     <configuration default="true" type="Application" factoryName="Application">
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="" />
       <envs />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="BuildArtifacts" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
+      <method />
     </configuration>
     <configuration default="true" type="JUnit" factoryName="JUnit">
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
       </option>
       <envs />
       <patterns />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="BuildArtifacts" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
+      <method />
     </configuration>
     <list size="0" />
     <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
   <component name="ShelveChangesManager" show_recycled="false" />
   <component name="TaskManager">
     <task active="true" id="Default" summary="Default task">
+      <changelist id="1833d504-8fea-4071-89fc-c5ea3ee2048d" name="Default" comment="" />
       <created>1354744805702</created>
       <updated>1354744805702</updated>
     </task>
   </component>
   <component name="ToolWindowManager">
     <frame x="0" y="22" width="2560" height="1330" extended-state="6" />
-    <editor active="true" />
+    <editor active="false" />
     <layout>
-      <window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
-      <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="FindBugs-IDEA" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Gradle" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+      <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
-      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.17581543" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.17581543" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+      <window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="FindBugs-IDEA" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Gradle" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
     </layout>
   </component>
   <component name="VcsContentAnnotationSettings">
     <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
     <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
     <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
-    <option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
     <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
     <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
     <option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
     <option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
     <option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
     <option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
-    <option name="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
     <option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
     <option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
+    <option name="SHOW_DIRTY_RECURSIVELY" value="false" />
+    <option name="LIMIT_HISTORY" value="true" />
+    <option name="MAXIMUM_HISTORY_ROWS" value="1000" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
     <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
     <option name="LAST_COMMIT_MESSAGE" />
   <component name="XDebuggerManager">
     <breakpoint-manager />
   </component>
-  <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/Towers/src/com/fxexperience/games/towers/TowersApplication.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="6" column="3" selection-start="137" selection-end="137" vertical-scroll-proportion="0.07614213">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-  </component>
   <component name="masterDetails">
     <states>
       <state key="ArtifactsStructureConfigurable.UI">

defender/.idea/misc.xml

   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/classes" />
   </component>
-  <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
-    <option name="USER" value="" />
-    <option name="PASSWORD" value="" />
-    <option name="mySSHConnectionTimeout" value="30000" />
-    <option name="mySSHReadTimeout" value="30000" />
-    <option name="LAST_MERGED_REVISION" />
-    <option name="MERGE_DRY_RUN" value="false" />
-    <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
-    <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
-    <option name="IGNORE_SPACES_IN_MERGE" value="false" />
-    <option name="DETECT_NESTED_COPIES" value="true" />
-    <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
-    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
-    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
-    <option name="FORCE_UPDATE" value="false" />
-    <option name="IGNORE_EXTERNALS" value="false" />
-    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
-  </component>
   <component name="VssConfiguration">
     <option name="CLIENT_PATH" value="" />
     <option name="SRCSAFEINI_PATH" value="" />

defender/.idea/vcs.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="" />
+    <mapping directory="" vcs="hg4idea" />
   </component>
 </project>
 

defender/.idea/workspace.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" name="Default" comment="" />
+    <list default="true" id="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" name="Default" comment="">
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/CONSTANTS.java" afterPath="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/CONSTANTS.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/GreenEnemy.java" afterPath="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/GreenEnemy.java" />
+    </list>
     <ignored path="defender.iws" />
     <ignored path=".idea/workspace.xml" />
     <file path="/BadGuy.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355255727703" ignored="false" />
     <file path="/Sprite.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355255891142" ignored="false" />
-    <file path="/GameView.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355256697759" ignored="false" />
-    <file path="/styles.css" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355257304210" ignored="false" />
-    <file path="/fragment.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355257399624" ignored="false" />
+    <file path="/GameView.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355434329201" ignored="false" />
+    <file path="/styles.css" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355461983303" ignored="false" />
+    <file path="/fragment.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355430489004" ignored="false" />
+    <file path="/SimpleLevel.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355428149507" ignored="false" />
+    <file path="/a.dummy" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355428173542" ignored="false" />
+    <file path="/Cell.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355432351311" ignored="false" />
+    <file path="/EnemyPath.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355428706180" ignored="false" />
+    <file path="/WaveLevel.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355430475922" ignored="false" />
+    <file path="/CONSTANTS.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355429405393" ignored="false" />
+    <file path="/LevelFactory.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355430553746" ignored="false" />
+    <file path="/DefenderApp.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355433172169" ignored="false" />
+    <file path="/Game.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355462723403" ignored="false" />
+    <file path="/CellUI.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355432438450" ignored="false" />
+    <file path="/Difficulty.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355432761625" ignored="false" />
+    <file path="/NewGamePanel.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355435630338" ignored="false" />
+    <file path="/SimpleGameScene.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355463005861" ignored="false" />
+    <file path="/GameBoardUI.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355436645866" ignored="false" />
+    <file path="/GameBoard.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355436131144" ignored="false" />
+    <file path="/GameControlPanel.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355462849656" ignored="false" />
+    <file path="/GameBoardPanel.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355436632490" ignored="false" />
+    <file path="/Enemy.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355459023752" ignored="false" />
+    <file path="/Tower.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355450920468" ignored="false" />
+    <file path="/LevelPanel.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355463689843" ignored="false" />
+    <file path="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/BadGuy.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355443175562" ignored="false" />
+    <file path="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/BadGuyFactory.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355443175562" ignored="false" />
+    <file path="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/Sprite.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355443175562" ignored="false" />
+    <file path="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/Tower.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355443175562" ignored="false" />
+    <file path="/BlueEnemy.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355458504401" ignored="false" />
+    <file path="/GreenEnemy.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355451534098" ignored="false" />
+    <file path="/BlackEnemy.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355451580564" ignored="false" />
+    <file path="/FirstLevel.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355462975667" ignored="false" />
+    <file path="/Wave.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355458749114" ignored="false" />
+    <file path="/BasicTower.java" changelist="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" time="1355462550106" ignored="false" />
     <option name="TRACKING_ENABLED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <disable_hints />
   </component>
   <component name="DebuggerManager">
-    <breakpoint_rules default_suspend_policy="SuspendAll" default_condition_enabled="true" />
     <ui_properties default_suspend_policy="SuspendAll" default_condition_enabled="true" />
     <breakpoint_any default_suspend_policy="SuspendAll" default_condition_enabled="true">
       <breakpoint>
         <option name="LOG_MESSAGE" value="" />
       </breakpoint>
     </breakpoint_any>
+    <breakpoint_rules default_suspend_policy="SuspendAll" default_condition_enabled="true" />
     <breakpoint_rules />
     <ui_properties />
   </component>
   </component>
   <component name="FileEditorManager">
     <leaf>
-      <file leaf-file-name="styles.css" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/main/resources/styles/styles.css">
+      <file leaf-file-name="LevelPanel.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/LevelPanel.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="10" column="11" selection-start="454" selection-end="454" vertical-scroll-proportion="0.13793103">
+            <state line="110" column="13" selection-start="4692" selection-end="4692" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Wave.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Wave.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="22" column="21" selection-start="513" selection-end="513" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="GameControlPanel.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/GameControlPanel.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="51" column="90" selection-start="2075" selection-end="2075" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="SimpleGameScene.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/SimpleGameScene.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="47" column="47" selection-start="2354" selection-end="2354" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Game.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Game.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="33" column="17" selection-start="1682" selection-end="1682" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="e#0#1974#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Enemy.java" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Enemy.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="91" column="9" selection-start="4226" selection-end="4226" vertical-scroll-proportion="0.6551724">
+              <folding>
+                <element signature="e#0#4497#0" expanded="true" />
+                <element signature="imports" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="BasicTower.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/towers/BasicTower.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="37" column="29" selection-start="1815" selection-end="1815" vertical-scroll-proportion="0.0">
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="GameView.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/GameView.java">
+      <file leaf-file-name="Tower.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Tower.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="46" column="0" selection-start="2161" selection-end="2191" vertical-scroll-proportion="0.0">
-              <folding />
+            <state line="39" column="87" selection-start="2165" selection-end="2165" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="e#0#2685#0" expanded="true" />
+                <element signature="imports" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="GameToolBox.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/GameToolBox.java">
+      <file leaf-file-name="BlueEnemy.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/BlueEnemy.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="44" column="13" selection-start="2128" selection-end="2128" vertical-scroll-proportion="0.0">
-              <folding />
+            <state line="26" column="0" selection-start="0" selection-end="1540" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="Level.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/level/Level.java">
+      <file leaf-file-name="FirstLevel.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/levels/FirstLevel.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="39" column="22" selection-start="1999" selection-end="1999" vertical-scroll-proportion="0.0">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Game.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/Game.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="49" column="29" selection-start="2487" selection-end="2495" vertical-scroll-proportion="-4.8846154">
-              <folding />
+            <state line="46" column="19" selection-start="2284" selection-end="2284" vertical-scroll-proportion="0.0">
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
   <component name="IdeDocumentHistory">
     <option name="changedFiles">
       <list>
-        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/BadGuy.java" />
-        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/Sprite.java" />
-        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/level/LevelFactory.java" />
-        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/GameView.java" />
-        <option value="$PROJECT_DIR$/src/main/resources/styles/styles.css" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/model/Tower.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/CellUI.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/GameBoardPanel.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Tower.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Wave.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Enemy.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/BlackEnemy.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/BlueEnemy.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/GreenEnemy.java" />
+        <option value="$PROJECT_DIR$/src/main/resources/styles/games/simple/styles.css" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/towers/BasicTower.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Game.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/GameControlPanel.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/levels/FirstLevel.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/SimpleGameScene.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/LevelPanel.java" />
       </list>
     </option>
   </component>
     <option name="width" value="2560" />
     <option name="height" value="1330" />
   </component>
-  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
     <OptionsSetting value="true" id="Add" />
     <OptionsSetting value="true" id="Remove" />
     <OptionsSetting value="true" id="Checkout" />
       <sortByType />
     </navigator>
     <panes>
+      <pane id="Scope" />
       <pane id="PackagesPane" />
-      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <PATH>
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
             <PATH_ELEMENT>
-              <option name="myItemId" value="styles" />
+              <option name="myItemId" value="simple" />
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
             <PATH_ELEMENT>
-              <option name="myItemId" value="ui" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="defender" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="defender" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="src" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="main" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="java" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="defender" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="sprite" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="defender" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="defender" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="src" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="main" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="java" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="defender" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="level" />
+              <option name="myItemId" value="simple" />
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
   <component name="PropertiesComponent">
     <property name="project.structure.last.edited" value="Project" />
     <property name="GoToFile.includeJavaFiles" value="false" />
+    <property name="OverrideImplement.combined" value="false" />
     <property name="project.structure.proportion" value="0.0" />
     <property name="options.splitter.main.proportions" value="0.3" />
     <property name="options.lastSelected" value="project.propCompiler" />
     <property name="restartRequiresConfirmation" value="true" />
     <property name="MemberChooser.showClasses" value="true" />
     <property name="GoToClass.includeLibraries" value="false" />
+    <property name="options.splitter.details.proportions" value="0.2" />
+    <property name="options.searchVisible" value="true" />
     <property name="dynamic.classpath" value="false" />
-    <property name="options.searchVisible" value="true" />
-    <property name="options.splitter.details.proportions" value="0.2" />
+  </component>
+  <component name="RecentsManager">
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="$PROJECT_DIR$/src/main/resources/styles" />
+      <recent name="$PROJECT_DIR$/src/main/resources/images" />
+      <recent name="$PROJECT_DIR$/src/main/resources/versions/spacedefender/images" />
+    </key>
   </component>
   <component name="RunManager" selected="Application.DefenderApp">
     <configuration default="false" name="DefenderApp" type="Application" factoryName="Application" temporary="true">
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="defender" />
       <envs />
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="" />
+        <option name="TRANSPORT" value="0" />
+        <option name="LOCAL" value="true" />
+      </RunnerSettings>
       <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Debug" />
       <ConfigurationWrapper RunnerId="Run" />
       <method />
     </configuration>
     </configuration>
   </component>
   <component name="ShelveChangesManager" show_recycled="false" />
+  <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="mySSHConnectionTimeout" value="30000" />
+    <option name="mySSHReadTimeout" value="30000" />
+    <option name="LAST_MERGED_REVISION" />
+    <option name="MERGE_DRY_RUN" value="false" />
+    <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+    <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+    <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+    <option name="DETECT_NESTED_COPIES" value="true" />
+    <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+    <option name="FORCE_UPDATE" value="false" />
+    <option name="IGNORE_EXTERNALS" value="false" />
+    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+  </component>
   <component name="TaskManager">
     <task active="true" id="Default" summary="Default task">
       <changelist id="7ebb0500-e9c0-4971-9727-f288d5dd7f6e" name="Default" comment="" />
   </component>
   <component name="ToolWindowManager">
     <frame x="0" y="22" width="2560" height="1330" extended-state="6" />
-    <editor active="true" />
+    <editor active="false" />
     <layout>
-      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32975206" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24980111" sideWeight="0.6702479" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
-      <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+      <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32975206" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
-      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.12569611" sideWeight="0.6702479" order="-1" side_tool="false" content_ui="tabs" />
+      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.12649165" sideWeight="0.6702479" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
-      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24980111" sideWeight="0.6702479" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24980111" sideWeight="0.6702479" order="0" side_tool="false" content_ui="combo" />
       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32975206" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
     </layout>
   </component>
   <component name="VcsContentAnnotationSettings">
     <option name="FILTER_TARGETS" value="false" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/LevelCompleteView.java">
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jfxrt.jar!/javafx/beans/property/ObjectPropertyBase.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="38" column="13" selection-start="1928" selection-end="1928" vertical-scroll-proportion="0.0">
+        <state line="31" column="13" selection-start="1251" selection-end="1251" vertical-scroll-proportion="0.0">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/NewGameView.java">
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jfxrt.jar!/javafx/event/ActionEvent.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="39" column="13" selection-start="1964" selection-end="1964" vertical-scroll-proportion="0.09578544">
+        <state line="12" column="11" selection-start="399" selection-end="399" vertical-scroll-proportion="0.0">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/CONSTANTS.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/NewGamePanel.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="15" column="13" selection-start="321" selection-end="321" vertical-scroll-proportion="0.0">
+        <state line="48" column="36" selection-start="2527" selection-end="2527" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/BlackEnemy.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="38" column="19" selection-start="1841" selection-end="1841" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/GreenEnemy.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="38" column="20" selection-start="1842" selection-end="1842" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/enemies/BlueEnemy.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="26" column="0" selection-start="0" selection-end="1540" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/resources/styles/games/simple/styles.css">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="67" column="21" selection-start="2573" selection-end="2573" vertical-scroll-proportion="0.8237548">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/DefenderApp.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/towers/BasicTower.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="35" column="13" selection-start="1813" selection-end="1813" vertical-scroll-proportion="0.0">
+        <state line="37" column="29" selection-start="1815" selection-end="1815" vertical-scroll-proportion="0.0">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/DefenderMainView.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/GameControlPanel.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="33" column="13" selection-start="1721" selection-end="1721" vertical-scroll-proportion="0.09578544">
-          <folding />
+        <state line="51" column="90" selection-start="2075" selection-end="2075" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/Sprite.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/levels/FirstLevel.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="61" column="19" selection-start="2621" selection-end="2628" vertical-scroll-proportion="0.651341">
-          <folding />
+        <state line="46" column="19" selection-start="2284" selection-end="2284" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/sprite/BadGuy.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/SimpleGameScene.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="85" column="8" selection-start="3599" selection-end="3599" vertical-scroll-proportion="0.42911878">
-          <folding />
+        <state line="47" column="47" selection-start="2354" selection-end="2354" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/level/Cell.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/LevelPanel.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="39" column="13" selection-start="1846" selection-end="1846" vertical-scroll-proportion="0.0">
-          <folding />
+        <state line="110" column="13" selection-start="4692" selection-end="4692" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/level/LevelFactory.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Wave.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="58" column="31" selection-start="1754" selection-end="1754" vertical-scroll-proportion="0.0">
-          <folding />
+        <state line="22" column="21" selection-start="513" selection-end="513" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/level/EnemyPath.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Tower.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="44" column="17" selection-start="1247" selection-end="1247" vertical-scroll-proportion="0.0">
-          <folding />
+        <state line="39" column="87" selection-start="2165" selection-end="2165" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="e#0#2685#0" expanded="true" />
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/level/WaveSlot.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Game.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="15" column="13" selection-start="324" selection-end="324" vertical-scroll-proportion="0.1724138">
-          <folding />
+        <state line="33" column="17" selection-start="1682" selection-end="1682" vertical-scroll-proportion="0.0">
+          <folding>
+            <element signature="e#0#1974#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/Game.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/games/simple/Enemy.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="49" column="29" selection-start="2487" selection-end="2495" vertical-scroll-proportion="-4.8846154">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/level/Level.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="39" column="22" selection-start="1999" selection-end="1999" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/GameToolBox.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="44" column="13" selection-start="2128" selection-end="2128" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/fxexperience/games/defender/ui/GameView.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="46" column="0" selection-start="2161" selection-end="2191" vertical-scroll-proportion="0.0">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/resources/styles/styles.css">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="10" column="11" selection-start="454" selection-end="454" vertical-scroll-proportion="0.13793103">
-          <folding />
+        <state line="91" column="9" selection-start="4226" selection-end="4226" vertical-scroll-proportion="0.6551724">
+          <folding>
+            <element signature="e#0#4497#0" expanded="true" />
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

defender/src/main/java/com/fxexperience/games/defender/CONSTANTS.java

  */
 package com.fxexperience.games.defender;
 
-import com.fxexperience.games.defender.level.Cell;
-import java.util.ArrayList;
-import java.util.List;
 import javafx.geometry.Dimension2D;
 
 /**
     public static final double LEVEL_HEIGHT = 600;
     public static final double LEVEL_WIDTH = 800;
     //Grid constants
-    public static final Dimension2D CELL_DIMENSIONS = new Dimension2D(20, 20);
+    public static final double CELL_HEIGHT = 20;
+    public static final double CELL_WIDTH = 20;
+    public static final int COL_COUNT = (int) (LEVEL_WIDTH / CELL_WIDTH);
+    public static final int ROW_COUNT = (int) (LEVEL_HEIGHT / CELL_HEIGHT);
+    public static final Dimension2D CELL_DIMENSIONS = new Dimension2D(CELL_WIDTH, CELL_HEIGHT);
     //Speed
     public static final int ENEMY_UNIT_BASE_SPEED = 100;//pixels per second
-    //For testing
-    public static final Cell START_CELL = new Cell(-1, -1);
-    public static final Cell FINISH_CELL = new Cell(41, 31);
-    public static final Cell[] CELLS_FOR_TEST = {START_CELL, FINISH_CELL};
-    //
 }

defender/src/main/java/com/fxexperience/games/defender/DefenderApp.java

  */
 package com.fxexperience.games.defender;
 
-import com.fxexperience.games.defender.ui.DefenderMainView;
+import com.fxexperience.games.defender.games.simple.SimpleGameScene;
 import javafx.application.Application;
-import javafx.scene.Scene;
 import javafx.stage.Stage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
+/**
+ * The main entry point for our application
+ */
 public class DefenderApp extends Application {
+    public void start(Stage stage) throws Exception {
+        // Right now we're hard-coding the creation of the main view to be the simple
+        // version of the app "SimpleGameScene" instance. However, we need to expand this
+        // so that we can load alternate games, perhaps by using reflection, or by
+        // just hard-coding a set of application parameter -> game view instances.
+        stage.setTitle("JavaFX Tower Defender");
+        stage.setScene(new SimpleGameScene());
+        stage.show();
+    }
 
-    private static final Logger log = LoggerFactory.getLogger(DefenderApp.class);
-
-    public static void main(String[] args) throws Exception {
+    public static void main(String[] args) {
         launch(args);
     }
-
-    public void start(Stage stage) throws Exception {
-
-        log.info("Starting JavaFX Tower Defender");
-
-        DefenderMainView mainView = new DefenderMainView();
-        Scene scene = new Scene(mainView, 1100, 700);
-        scene.getStylesheets().add("/styles/styles.css");
-
-        stage.setTitle("JavaFX Tower Defender");
-        stage.setScene(scene);
-        stage.show();
-        log.info("JavaFX Tower Defender started successfully - ready for action");
-
-        Game game = new Game(mainView);
-        game.showNewGameDialog();
-    }
 }

defender/src/main/java/com/fxexperience/games/defender/Difficulty.java

-/*
- * Copyright (c) 2012, FX Experience. All rights  reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer. 
- *
- * Redistributions in binary form must reproduce the above copyright notice, this list of 
- * conditions and the following disclaimer in the documentation and/or other materials provided 
- * with the distribution.    
- *
- * Neither the name of the author nor the names of its contributors may be used to endorse or
- * promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.fxexperience.games.defender;
-
-public enum Difficulty {
-
-    easy, medium, hard
-}

defender/src/main/java/com/fxexperience/games/defender/Game.java

-/*
- * Copyright (c) 2012, FX Experience. All rights  reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- * conditions and the following disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * Neither the name of the author nor the names of its contributors may be used to endorse or
- * promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.fxexperience.games.defender;
-
-import com.fxexperience.games.defender.level.Level;
-import com.fxexperience.games.defender.level.LevelFactory;
-import com.fxexperience.games.defender.level.SimpleLevel;
-import com.fxexperience.games.defender.ui.DefenderMainView;
-import com.fxexperience.games.defender.ui.GameView;
-import com.fxexperience.games.defender.ui.LevelCompleteView;
-import com.fxexperience.games.defender.ui.NewGameView;
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.ObjectProperty;
-import javafx.beans.property.SimpleBooleanProperty;
-import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Game {
-
-    private static final Logger log = LoggerFactory.getLogger(Game.class);
-
-    private final DefenderMainView defenderMainView;
-    private GameView gameView;
-    private ObjectProperty<Level> level;
-    private ObjectProperty<Difficulty> difficulty;
-    private BooleanProperty paused;
-    private int nextLevel = 1;
-    private LevelCompleteListener levelCompleteListener;
-    private NewGameView newGameView;
-    private Level currentLevel;
-
-    public Game(DefenderMainView defenderMainView) {
-
-        this.defenderMainView = defenderMainView;
-        this.level = new SimpleObjectProperty<Level>();
-        this.difficulty = new SimpleObjectProperty<Difficulty>();
-        this.paused = new SimpleBooleanProperty();
-
-        this.gameView = new GameView(this);
-
-        levelCompleteListener = new LevelCompleteListener();
-        level.addListener(new ChangeListener<Level>() {
-            @Override
-            public void changed(ObservableValue<? extends Level> source, Level oldLevel, Level newLevel) {
-                if (oldLevel != null) {
-                    oldLevel.completeProperty().removeListener(levelCompleteListener);
-                }
-                if (newLevel != null) {
-                    log.debug("Adding level complete listener");
-                    newLevel.completeProperty().addListener(levelCompleteListener);
-                }
-            }
-        });
-    }
-
-    public void showNewGameDialog() {
-        setPaused(true);
-        if (newGameView == null) {
-            newGameView = new NewGameView(this);
-        }
-        defenderMainView.showView(newGameView);
-    }
-
-    public void startNewGame(Difficulty difficulty) {
-        log.info("Starting new game with difficulty '{}'", difficulty);
-        setDifficulty(difficulty);
-        stopCurrentLevel();
-        nextLevel = 1;
-        nextLevel();
-    }
-
-    public void nextLevel() {
-        stopCurrentLevel();
-        Level nextLevel = createNextLevel();
-        log.info("Changing game level to: {}", nextLevel.getName());
-        this.level.set(nextLevel);
-        nextLevel.start();
-        setPaused(false);
-        defenderMainView.showView(gameView);
-    }
-    
-    public Level getCurrentLevel() {
-        return currentLevel;
-    }
-
-    public BooleanProperty pausedProperty() {
-        return paused;
-    }
-
-    public void setPaused(boolean paused) {
-        this.paused.set(paused);
-    }
-
-    public boolean isPaused() {
-        return paused.get();
-    }
-
-    public ObjectProperty<Level> levelProperty() {
-        return this.level;
-    }
-
-    public Level getLevel() {
-        return level.get();
-    }
-
-    public ObjectProperty<Difficulty> difficultyProperty() {
-        return difficulty;
-    }
-
-    public Difficulty getDifficulty() {
-        return difficulty.get();
-    }
-
-    public void setDifficulty(Difficulty difficulty) {
-        this.difficulty.set(difficulty);
-    }
-
-    protected void stopCurrentLevel() {
-        Level currentLevel = levelProperty().get();
-        if (currentLevel != null) {
-            log.debug("Stopping current game level: " + level.getName());
-            currentLevel.stop();
-        }
-    }
-
-    protected Level createNextLevel() {
-        // todo can create weird and wonderful levels here - load from level file, etc
-//        return new SimpleLevel(this, "Level " + nextLevel++, 5);
-        return LevelFactory.getInstance().getLevel(this.getDifficulty(), this, nextLevel);
-    }
-
-    //---------------------------------------------------------------------------------------------
-
-    private final class LevelCompleteListener implements ChangeListener<Boolean> {
-
-        private LevelCompleteView levelCompleteView;
-
-        @Override
-        public void changed(ObservableValue<? extends Boolean> source, Boolean wasComplete, Boolean isComplete) {
-
-            if (isComplete) {
-                Level level = getLevel();
-                log.info("{} was completed!", level.getName());
-                if (levelCompleteView == null) {
-                    levelCompleteView = new LevelCompleteView(Game.this);
-                }
-                levelCompleteView.setLevel(level);
-                defenderMainView.showView(levelCompleteView);
-            }
-        }
-    }
-}

defender/src/main/java/com/fxexperience/games/defender/games/simple/Difficulty.java

+/*
+ * Copyright (c) 2012, FX Experience. All rights  reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * Neither the name of the author nor the names of its contributors may be used to endorse or
+ * promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.fxexperience.games.defender.games.simple;
+
+/**
+ * Enumerates the different difficulty levels for the game. This may be used to
+ * determine enemy speed, hit points, numbers of waves, etc.
+ */
+public enum Difficulty {
+    EASY,
+    MEDIUM,
+    HARD,
+    INSANE,
+    APOCALYPTIC
+}

defender/src/main/java/com/fxexperience/games/defender/games/simple/Enemy.java

+/*
+ * Copyright (c) 2012, FX Experience. All rights  reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * Neither the name of the author nor the names of its contributors may be used to endorse or
+ * promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.fxexperience.games.defender.games.simple;
+
+import javafx.beans.property.*;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.Parent;
+
+/**
+ * An enemy. Has life, speed, and some path that it is to follow. It might have different
+ * buffs depending on what type of weapon hits it, proximity to other enemies (they might
+ * make each other stronger) or whatever else you might come up with.
+ */
+public class Enemy extends Parent {
+    /**
+     * The maximum life of this enemy.
+     */
+    private final double maximumLife;
+    public final double getMaximumLife() { return maximumLife; }
+
+    /**
+     * When life reaches 0 (or goes negative), the enemy is destroyed.
+     */
+    private final ReadOnlyDoubleWrapper life = new ReadOnlyDoubleWrapper(this, "life", 100);
+    public final double getLife() { return life.get(); }
+    public final ReadOnlyDoubleProperty lifeProperty() { return life.getReadOnlyProperty(); }
+
+    /**
+     * The natural speed at which the enemy moves. This is the speed at which
+     * the enemy will move in the absence of any buffs.
+     */
+    private final double naturalSpeed;
+    public final double getNaturalSpeed() { return naturalSpeed; }
+
+    /**
+     * The speed at which the enemy is moving. This can go up or down depending
+     * on different game dynamics (for example, a tower with some "slow down" buff
+     * could cause the speed to decrease for some period of time).
+     */
+    private final ReadOnlyDoubleWrapper speed = new ReadOnlyDoubleWrapper(this, "speed");
+    public final double getSpeed() { return speed.get(); }
+    public final ReadOnlyDoubleProperty speedProperty() { return speed.getReadOnlyProperty(); }
+
+    /**
+     * Called when the enemy dies.
+     */
+    private ObjectProperty<EventHandler<ActionEvent>> onDeath = new SimpleObjectProperty<>(this, "onDeath");
+
+    public final EventHandler<ActionEvent> getOnDeath() { return onDeath.get(); }
+    public final void setOnDeath(EventHandler<ActionEvent> value) { onDeath.set(value); }
+    public final ObjectProperty<EventHandler<ActionEvent>> onDeathProperty() { return onDeath; }
+
+    /**
+     * Creates a new Enemy. You must specify the natural speed of the enemy and its max life.
+     * @param maximumLife must be positive
+     * @param naturalSpeed must be positive. Measured in pixels per second.
+     */
+    public Enemy(double maximumLife, double naturalSpeed) {
+        this.maximumLife = maximumLife;
+        this.naturalSpeed = naturalSpeed;
+        this.speed.set(naturalSpeed);
+    }
+
+    public void damage(double amount) {
+        double l = getLife();
+        life.set(Math.max(0, l - amount));
+        if (getLife() == 0 && onDeath.get() != null) {
+            onDeath.get().handle(new ActionEvent(this, this));
+        }
+    }
+
+    public void heal(double amount) {
+        double l = getLife();
+        life.set(Math.min(maximumLife, l + amount));
+    }
+
+    // ... etc
+}

defender/src/main/java/com/fxexperience/games/defender/games/simple/Game.java

+/*
+ * Copyright (c) 2012, FX Experience. All rights  reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * Neither the name of the author nor the names of its contributors may be used to endorse or
+ * promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.fxexperience.games.defender.games.simple;
+
+import javafx.beans.property.*;
+
+/**
+ * User: rbair
+ * Date: 12/13/12
+ * Time: 12:50 PM
+ */
+public class Game {
+    public final BooleanProperty paused = new SimpleBooleanProperty(this, "paused", false);
+    public final DoubleProperty money = new SimpleDoubleProperty(this, "money", 100);
+    public final IntegerProperty lives = new SimpleIntegerProperty(this, "lives", 10);
+}

defender/src/main/java/com/fxexperience/games/defender/games/simple/GameControlPanel.java

+package com.fxexperience.games.defender.games.simple;
+
+import com.fxexperience.games.defender.games.simple.towers.BasicTower;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.control.Button;
+import javafx.scene.control.ToggleButton;
+import javafx.scene.control.ToggleGroup;
+import javafx.scene.layout.GridPane;
+import javafx.scene.layout.StackPane;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ */
+public class GameControlPanel extends StackPane {
+    public GameControlPanel(final Game game) {
+        getStyleClass().add("game-control-panel");
+        List<? extends Tower> towers = Arrays.asList(
+                new BasicTower()
+        );
+
+        try {
+            Parent content = FXMLLoader.load(getClass().getResource("/styles/games/simple/GameControlPanel.fxml"));
+            getChildren().add(content);
+
+            ToggleGroup grp = new ToggleGroup();
+            GridPane towerGrid = (GridPane)content.lookup("#tower-grid");
+            List<Node> towerButtons = towerGrid.getChildren();
+            for (int i=0; i<towerButtons.size(); i++) {
+                ToggleButton btn = (ToggleButton)towerButtons.get(i);
+                btn.setToggleGroup(grp);
+                if (i < towers.size()) {
+                    Tower tower = towers.get(i);
+                    btn.setText(tower.name.get());
+                } else {
+                    // might want to just set disabled instead, and have each button hard-coded to
+                    // be of a certain tower type!
+                    btn.setVisible(false);
+                }
+            }
+
+            final Button playButton = (Button)content.lookup("#play-button");
+            playButton.setOnAction(new EventHandler<ActionEvent>() {
+                @Override
+                public void handle(ActionEvent actionEvent) {
+                    game.paused.set(!game.paused.get());
+                    playButton.setText(game.paused.get() ? "Send The Enemies!" : "Pause");
+                }
+            });
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

defender/src/main/java/com/fxexperience/games/defender/games/simple/LevelPanel.java

+/*
+ * Copyright (c) 2012, FX Experience. All rights  reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * Neither the name of the author nor the names of its contributors may be used to endorse or
+ * promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.fxexperience.games.defender.games.simple;
+
+import com.fxexperience.games.defender.CONSTANTS;
+import javafx.animation.Animation;
+import javafx.animation.AnimationTimer;
+import javafx.animation.Interpolator;
+import javafx.animation.PathTransition;
+import javafx.beans.InvalidationListener;
+import javafx.beans.Observable;
+import javafx.collections.ListChangeListener;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.geometry.Bounds;
+import javafx.geometry.Insets;
+import javafx.geometry.Point2D;
+import javafx.scene.Node;
+import javafx.scene.layout.Pane;
+import javafx.scene.layout.Region;
+import javafx.scene.shape.LineTo;
+import javafx.scene.shape.MoveTo;
+import javafx.scene.shape.Path;
+import javafx.scene.shape.Rectangle;
+import javafx.util.Duration;
+
+import java.util.*;
+
+/**
+ * This UI represents the game board. It has all the tiles, towers, enemies, background, and so forth.
+ * The GameControlPanelUI is separate, and has the money values etc. A single Level has a single path
+ * (or set of paths) on which the enemies roam. Multiple waves of enemies will come following one or
+ * more of those paths.
+ */
+public abstract class LevelPanel extends Region {
+    private Region background;
+    private Rectangle clip;
+    protected Pane enemyLayer;
+    private Pane towerLayer;
+    private Pane projectileLayer;
+
+    private final Game game;
+    private LinkedList<Wave> waves;
+    private Path path;
+    private boolean running = false;
+
+    private Set<Animator> animators = new HashSet<>();
+    private Set<Animation> animations = new HashSet<>();
+
+    public LevelPanel(final Game game, final Path path, Wave... w) {
+        this.game = game;
+        game.paused.set(true); // For safety sake
+        game.paused.addListener(new InvalidationListener() {
+            @Override
+            public void invalidated(Observable observable) {
+                // If we are paused, then stop any timers
+                // If we are not paused, start the timers. If there are no timers, start a wave.
+                if (game.paused.get()) {
+                    for (Animator a : animators) a.pause();
+                    for (Animation a : animations) a.pause();
+                } else if (!running) {
+                    startWave();
+                } else {
+                    for (Animator a : animators) a.start();
+                    for (Animation a : animations) a.play();
+                }
+            }
+        });
+        getStyleClass().add("game-board");
+        this.waves = new LinkedList<>(Arrays.asList(w));
+        this.path = path;
+
+        background = new Region();
+        background.getStyleClass().add("background");
+        enemyLayer = new Pane();
+        towerLayer = new Pane();
+        projectileLayer = new Pane();
+        getChildren().addAll(background, enemyLayer, towerLayer, projectileLayer);
+
+        clip = new Rectangle();
+        setClip(clip);
+
+        placeTower(); // hack
+
+        // The level is complete when the spawner has finished and all enemies have been destroyed
+        enemyLayer.getChildren().addListener(new ListChangeListener<Node>() {
+            @Override
+            public void onChanged(Change<? extends Node> change) {
+                if (enemyLayer.getChildren().isEmpty() && !running) {
+                    System.out.println("WAVE COMPLETE");
+                    if (waves.isEmpty()) {
+                        System.out.println("LEVEL COMPLETE");
+                    } else {
+                        startWave();
+                    }
+                }
+            }
+        });
+    }
+
+    private void startWave() {
+        running = true;
+        final Wave wave = waves.removeFirst();
+        final Animator spawner = new Animator(wave.getDelay()) {
+            @Override
+            protected void pulse() {
+                final Enemy e = wave.nextEnemy();
+                e.setLayoutX(-20);
+                e.setLayoutY(-20);
+                enemyLayer.getChildren().add(e);
+                final PathTransition tx = new PathTransition(Duration.seconds(e.getSpeed()* 3), path, e);
+                tx.setInterpolator(Interpolator.LINEAR);
+                tx.setOnFinished(new EventHandler<ActionEvent>() {
+                    @Override
+                    public void handle(ActionEvent actionEvent) {
+                        if (!enemyLayer.getChildren().isEmpty()) {
+                            Enemy removed = (Enemy) enemyLayer.getChildren().remove(0); // because the enemy that exited the area is always at the head
+                            assert e == removed;
+                        }
+                        animations.remove(tx);
+                    }
+                });
+                e.setOnDeath(new EventHandler<ActionEvent>() {
+                    @Override
+                    public void handle(ActionEvent actionEvent) {
+                        tx.stop();
+                        enemyLayer.getChildren().remove(e);
+                    }
+                });
+                animations.add(tx);
+                tx.play();
+                if (!wave.hasMoreEnemies()) {
+                    stop();
+                    running = false;
+                    animators.remove(this);
+                }
+            }
+        };
+        spawner.start();
+        animators.add(spawner);
+    }
+
+    public void placeTower() {
+        final Tower tower = new Tower(){{
+            Region r = new Region();
+            r.getStyleClass().add("tower");
+            getChildren().add(r);
+            setLayoutY(200);
+            setLayoutX(300);
+
+            final Animator t = new Animator(Duration.seconds(fireRate.get())) {
+                @Override
+                protected void pulse() {
+                    // TODO can enable arbitrarily complex target acquisition logic here. For example,
+                    // the tower should calculate what enemy it can damage the most, and destroy before
+                    // passing outside its bounds.
+                    // Check to see if any enemies are within the range of this guy.
+                    Bounds bounds = getBoundsInParent();
+                    Point2D center = new Point2D(
+                            bounds.getMinX() + (bounds.getWidth()/2.0),
+                            bounds.getMinY() + (bounds.getHeight()/2.0));
+
+                    List<Enemy> enemies = (List<Enemy>)(List)enemyLayer.getChildren();
+                    for (final Enemy e : enemies) {
+                        Bounds enemyBounds = e.getBoundsInParent();
+                        Point2D enemyCenter = new Point2D(
+                                enemyBounds.getMinX() + (enemyBounds.getWidth()/2.0),
+                                enemyBounds.getMinY() + (enemyBounds.getHeight()/2.0));
+
+                        double x = Math.max(enemyCenter.getX(), center.getX()) - Math.min(enemyCenter.getX(), center.getX());
+                        double y = Math.max(enemyCenter.getX(), center.getX()) - Math.min(enemyCenter.getX(), center.getX());
+                        double hyp = Math.sqrt((x*x) + (y*y));
+                        if (hyp < range.get() + (Math.max(enemyBounds.getHeight(), enemyBounds.getWidth()))) {
+                            // Lock in a firing solution
+                            final Region projectile = new Region();
+                            projectile.getStyleClass().add("bullet");
+                            projectile.setTranslateY(center.getY());
+                            projectile.setTranslateX(center.getX());
+                            projectileLayer.getChildren().add(projectile);
+                            Path firePath = new Path(new MoveTo(center.getX(), center.getY()), new LineTo(enemyCenter.getX(), enemyCenter.getY()));
+                            final PathTransition tx = new PathTransition(Duration.seconds(.2), firePath, projectile);
+                            tx.setOnFinished(new EventHandler<ActionEvent>() {
+                                @Override
+                                public void handle(ActionEvent actionEvent) {
+                                    e.damage(10);
+                                    projectileLayer.getChildren().remove(projectile);
+                                    animations.remove(tx);
+                                }
+                            });
+                            tx.play();
+                            animations.add(tx);
+                            break;
+                        }
+                    }