Author: hhubner Date: 2006-03-10 10:13:53 -0500 (Fri, 10 Mar 2006) New Revision: 1911
Modified: branches/xml-class-rework/projects/mah-jongg/src/game.lisp branches/xml-class-rework/projects/mah-jongg/website/game.js branches/xml-class-rework/projects/mah-jongg/website/game.xsl Log: Change order of winds, first real-life test was successful.
Modified: branches/xml-class-rework/projects/mah-jongg/src/game.lisp =================================================================== --- branches/xml-class-rework/projects/mah-jongg/src/game.lisp 2006-03-10 14:53:13 UTC (rev 1910) +++ branches/xml-class-rework/projects/mah-jongg/src/game.lisp 2006-03-10 15:13:53 UTC (rev 1911) @@ -21,7 +21,7 @@ (find wind (players *round*) :key #'wind))
(defun next-wind (player) - (cadr (member (wind player) '(:east :south :west :north :east)))) + (cadr (member (wind player) '(:east :north :west :south :east))))
(defun east-p (player) (eq :east (wind player))) @@ -40,12 +40,12 @@ (or (find name (players *round*) :key #'name :test #'string-equal) (error "can't find player named ~S" name)))
-(deftransaction make-round (east north west south) +(deftransaction make-round (east south west north) (setf *round* (make-instance 'round :players (list (make-player east :east) - (make-player north :north) + (make-player south :south) (make-player west :west) - (make-player south :south))))) + (make-player north :north)))))
(defun rotate-winds () (dolist (player (players *round*)) @@ -117,7 +117,7 @@ (:undo (restore (parse-integer undo-timestamp))) (:make-round - (make-round east north west south)) + (make-round east south west north)) (:make-game (make-game (1- (get-universal-time)) (name (wind->player (make-keyword-from-string winner)))
Modified: branches/xml-class-rework/projects/mah-jongg/website/game.js =================================================================== --- branches/xml-class-rework/projects/mah-jongg/website/game.js 2006-03-10 14:53:13 UTC (rev 1910) +++ branches/xml-class-rework/projects/mah-jongg/website/game.js 2006-03-10 15:13:53 UTC (rev 1911) @@ -1,6 +1,6 @@ // -*- Java -*-
-var winds = [ 'east', 'north', 'west', 'south' ]; +var winds = [ 'east', 'south', 'west', 'north' ];
function $(name) {
Modified: branches/xml-class-rework/projects/mah-jongg/website/game.xsl =================================================================== --- branches/xml-class-rework/projects/mah-jongg/website/game.xsl 2006-03-10 14:53:13 UTC (rev 1910) +++ branches/xml-class-rework/projects/mah-jongg/website/game.xsl 2006-03-10 15:13:53 UTC (rev 1911) @@ -31,10 +31,10 @@ </tr> <tr> <td> - <img src="north.jpg" width="100" height="140"/> + <img src="south.jpg" width="100" height="140"/> </td> <td> - <input type="text" id="north" name="north" autocomplete="off"/> + <input type="text" id="south" name="south" autocomplete="off"/> </td> </tr> <tr> @@ -47,10 +47,10 @@ </tr> <tr> <td> - <img src="south.jpg" width="100" height="140"/> + <img src="north.jpg" width="100" height="140"/> </td> <td> - <input type="text" id="south" name="south" autocomplete="off"/> + <input type="text" id="north" name="north" autocomplete="off"/> </td> </tr> <tr>