Preparation for adding german cards
authorarun <arun@nubati.net>
Sat, 24 Mar 2007 21:31:28 +0000 (21:31 +0000)
committerarun <arun>
Sat, 24 Mar 2007 21:31:28 +0000 (21:31 +0000)
25 files changed:
cards/english/1.png [moved from cards/1.png with 100% similarity]
cards/english/11.png [moved from cards/11.png with 100% similarity]
cards/english/13.png [moved from cards/13.png with 100% similarity]
cards/english/15.png [moved from cards/15.png with 100% similarity]
cards/english/17.png [moved from cards/17.png with 100% similarity]
cards/english/19.png [moved from cards/19.png with 100% similarity]
cards/english/21.png [moved from cards/21.png with 100% similarity]
cards/english/23.png [moved from cards/23.png with 100% similarity]
cards/english/25.png [moved from cards/25.png with 100% similarity]
cards/english/27.png [moved from cards/27.png with 100% similarity]
cards/english/29.png [moved from cards/29.png with 100% similarity]
cards/english/3.png [moved from cards/3.png with 100% similarity]
cards/english/31.png [moved from cards/31.png with 100% similarity]
cards/english/33.png [moved from cards/33.png with 100% similarity]
cards/english/35.png [moved from cards/35.png with 100% similarity]
cards/english/37.png [moved from cards/37.png with 100% similarity]
cards/english/39.png [moved from cards/39.png with 100% similarity]
cards/english/41.png [moved from cards/41.png with 100% similarity]
cards/english/43.png [moved from cards/43.png with 100% similarity]
cards/english/45.png [moved from cards/45.png with 100% similarity]
cards/english/47.png [moved from cards/47.png with 100% similarity]
cards/english/5.png [moved from cards/5.png with 100% similarity]
cards/english/7.png [moved from cards/7.png with 100% similarity]
cards/english/9.png [moved from cards/9.png with 100% similarity]
output.php

similarity index 100%
rename from cards/1.png
rename to cards/english/1.png
similarity index 100%
rename from cards/11.png
rename to cards/english/11.png
similarity index 100%
rename from cards/13.png
rename to cards/english/13.png
similarity index 100%
rename from cards/15.png
rename to cards/english/15.png
similarity index 100%
rename from cards/17.png
rename to cards/english/17.png
similarity index 100%
rename from cards/19.png
rename to cards/english/19.png
similarity index 100%
rename from cards/21.png
rename to cards/english/21.png
similarity index 100%
rename from cards/23.png
rename to cards/english/23.png
similarity index 100%
rename from cards/25.png
rename to cards/english/25.png
similarity index 100%
rename from cards/27.png
rename to cards/english/27.png
similarity index 100%
rename from cards/29.png
rename to cards/english/29.png
similarity index 100%
rename from cards/3.png
rename to cards/english/3.png
similarity index 100%
rename from cards/31.png
rename to cards/english/31.png
similarity index 100%
rename from cards/33.png
rename to cards/english/33.png
similarity index 100%
rename from cards/35.png
rename to cards/english/35.png
similarity index 100%
rename from cards/37.png
rename to cards/english/37.png
similarity index 100%
rename from cards/39.png
rename to cards/english/39.png
similarity index 100%
rename from cards/41.png
rename to cards/english/41.png
similarity index 100%
rename from cards/43.png
rename to cards/english/43.png
similarity index 100%
rename from cards/45.png
rename to cards/english/45.png
similarity index 100%
rename from cards/47.png
rename to cards/english/47.png
similarity index 100%
rename from cards/5.png
rename to cards/english/5.png
similarity index 100%
rename from cards/7.png
rename to cards/english/7.png
similarity index 100%
rename from cards/9.png
rename to cards/english/9.png
index 55cf0a5..1e747e6 100644 (file)
@@ -141,25 +141,25 @@ function output_form_for_new_game($names)
 <?php
 }
 
-function display_card($card)
+function display_card($card,$dir="english")
 {
   /* cards are only availabl for the odd values, e.g. 1.png, 3.png, ... 
    * convert even cards to the matching odd value */
 
   if( $card/2 - (int)($card/2) == 0.5)
-    echo "<img src=\"cards/".$card.".png\"  alt=\"".card_to_name($card)."\" />\n";
+    echo "<img src=\"cards/".$dir."/".$card.".png\"  alt=\"".card_to_name($card)."\" />\n";
   else
-    echo "<img src=\"cards/".($card-1).".png\"  alt=\"".card_to_name($card-1)."\" />\n";
+    echo "<img src=\"cards/".$dir."/".($card-1).".png\"  alt=\"".card_to_name($card-1)."\" />\n";
 
   return;
 }
 
-function display_link_card($card)
+function display_link_card($card,$dir="english")
 {
   if( $card/2 - (int)($card/2) == 0.5)
-    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".$card.".png\" alt=\"\" />\n";
+    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".$dir."/".$card.".png\" alt=\"\" />\n";
   else
-    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".($card-1).".png\" alt=\"\" />\n";
+    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".$dir."/".($card-1).".png\" alt=\"\" />\n";
   return;
 }