Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed error printing... added monstor decor

  • Loading branch information...
commit 37680a3391fc1e25c2d7b16f76e9624435b7291f 1 parent 3f581ca
@slagyr authored
View
8 public/stylesheets/hunt_the_wumpus.css
@@ -107,6 +107,14 @@ div#movement, div#shooting {
width: 206px;
}
+div#decor {
+ display: inline-block;
+ font-size: 5pt;
+ color: black;
+ font-weight: bold;
+ padding-left: 45px;
+}
+
div#shooting {
float: right;
}
View
3  src/hunt_the_wumpus/controller/command_controller.clj
@@ -19,7 +19,8 @@
player (:player-name (:session *request*))
report (perform-command *game* player command)]
(-> (redirect "/console")
- (update-in [:session] assoc :report report))))
+ (update-in [:session] assoc :report report)
+ (update-in [:session] assoc :game @*game*))))
(defn- shoot [direction]
(-> (redirect "/console")
View
3  src/hunt_the_wumpus/controller/login_controller.clj
@@ -10,7 +10,8 @@
(defn- successful-login [name]
(let [report (perform-command *game* name join-game)]
(-> (redirect "/console")
- (update-in [:session] assoc :player-name name :report report))))
+ (update-in [:session] assoc :player-name name :report report)
+ (update-in [:session] assoc :game @*game*))))
(defn- process-login []
(let [params (:params *request*)
View
2  src/hunt_the_wumpus/model/game.clj
@@ -40,7 +40,7 @@
after (alter game-ref update-game command-thunk player)]
(report before after player))
(catch Exception e
- (.printStackTrace e)
+; (.printStackTrace e)
{:error (.getMessage e)}))))
(def *game*
View
0  src/hunt_the_wumpus/view/console/death_by_wumpus.hiccup.clj
No changes.
View
27 src/hunt_the_wumpus/view/console/show.hiccup.clj
@@ -20,6 +20,33 @@
[:div.west [:a {:href "/command/move/west"}]]
[:div.east [:a {:href "/command/move/east"}]]
[:div.south [:a {:href "/command/move/south"}]]]
+ [:div#decor
+ [:pre "
+ . .
+ | |
+ || ||
+ || ||
+ /~~\\ /~~\\
+ | \\_____/ |
+ | II II |
+ | II II |
+ | II II |
+ | /
+ | ~~-~~|~
+ | { !
+ | { !
+ | ~~!~
+ | \\
+ \\ /
+ \\ /
+ =====
+ ( )
+ ---{ }---
+ +++++
+ | |
+ | |
+
+ "]]
[:div#shooting
[:h4 "Shoot"]
[:div.north [:a {:href "/command/shoot/north"}]]
Please sign in to comment.
Something went wrong with that request. Please try again.