changeset 3278:89475481eb83

sea
author Minoru Konno <c113069@e.koeki-u.ac.jp>
date Sat, 23 Jul 2016 18:04:05 +0900
parents ed744da6dffd
children e976ffb31594
files event/oasis2016/don/ckgame.rb event/oasis2016/rogin.rb event/oasis2016/sea/ckgame.rb
diffstat 3 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/event/oasis2016/don/ckgame.rb	Sat Jul 23 15:33:03 2016 +0900
+++ b/event/oasis2016/don/ckgame.rb	Sat Jul 23 18:04:05 2016 +0900
@@ -51,9 +51,9 @@
   else                          # プレイ名設定済みならキーワード入力
     title = sprintf("%s さんのホーム", info[id]["name"])
     setumei = "海鮮丼の絵から間違いを3個見つけよう!"
-    setumei2 = "間違っている絵のパネルは全部で9個あるよ♪"
-    seikai = 
-         '<img src="kaisendon.jpg" width="600px" height="600px">'
+    setumei2 = "QRコードをたくさん読みこんでパネルを埋めよう!"
+    guide = "間違っている絵のパネルは全部で9個あるよ♪"
+    seikai = '<img src="kaisendon.jpg" width="600px" height="600px">'
     # プレイ名設定済みで、さらにキーワードが入力されていたら
     if form_kwd > ""
       index = bingoword.index(form_kwd) # 配列から入力単語(form_kwd)を探索
--- a/event/oasis2016/rogin.rb	Sat Jul 23 15:33:03 2016 +0900
+++ b/event/oasis2016/rogin.rb	Sat Jul 23 18:04:05 2016 +0900
@@ -68,7 +68,7 @@
 <h2>%s</h2>  
 <h2>%s</h2>  
 <form action="?" method="GET">
-<p> %s<br>
+<p class=jyama> %s<br>
 %s: %s</p>    
 </body></html>
 EOF
--- a/event/oasis2016/sea/ckgame.rb	Sat Jul 23 15:33:03 2016 +0900
+++ b/event/oasis2016/sea/ckgame.rb	Sat Jul 23 18:04:05 2016 +0900
@@ -15,13 +15,13 @@
 form_name=c["playname"]        # nameをフォームから取得(もしあれば)
 form_kwd=c["keyword"]          # keywordも取得(もしあれば)
 
-if cookie_id == nil             # (1)もしcookieからのidがなければ新規生成
+#if cookie_id == nil             # (1)もしcookieからのidがなければ新規生成
   # 新規idは、現在時刻を秒(to_i)にした文字列(to_s)と乱数の組み合わせ
   newid = Time.now.to_i.to_s + "/" + rand(99999).to_s
   id=newid                      # 新規idをidとする
-else                            # (2)cookieからのidがあればそれをidとする
+#else                            # (2)cookieからのidがあればそれをidとする
   id=cookie_id
-end
+#end
 
 # idをすぐcookieで相手ブラウザに送る
 # 変数の期限を24時間に設定し、expire変数に入れる
@@ -41,21 +41,23 @@
   end
   point = 0# 開始直後は0点
   if !info[id]["name"]      # もしユーザのプレイ名が未設定なら
+    umi = '<img src="umi.png" width="800px" height="600px">'
     title = "ようこそ!"
     hello = "まちがいさがしスタート"
     guide = "あなたのプレイ名を決めます"
     input = '<input name="playname">'
+    submit = '<input type="submit" value="送信">'
+    reset = '<input type="reset" value="リセット">'
   else                          # プレイ名設定済みならキーワード入力
     title = sprintf("%s さんのホーム", info[id]["name"])
-    setumei = "絵から間違いを3個見つけよう!"
-    setumei2 = "間違っている絵のパネルは全部で3個あるよ♪"
-    guide = "QRコードを読みこんでパネルを埋めよう!
-    input = '<input name="keyword">'
+    setumei = "QRコード読みこんでパネルを埋めて絵を完成させよう!!"
+    setumei2 = "完成させた絵と元の絵の違いを探せ!"
+    guide = "間違っている場所は3個あるよ♪"
     seikai = '<img src="ans.jpg" width="450px" height="450px">'
     # プレイ名設定済みで、さらにキーワードが入力されていたら
     if form_kwd > ""
       index = bingoword.index(form_kwd) # 配列から入力単語(form_kwd)を探索
-      hello = sprintf("現在のポイントは %dpt です。", 25*point)
+      #hello = sprintf("現在のポイントは %dpt です。", 25*point)
       if index
         # 見付かった! その単語をハッシュのキーとして適当に値(true)を入れておく
         info[id]["bingo"][bingoword[index]] = true
@@ -65,7 +67,7 @@
     bingos = info[id]["bingo"].keys.collect do |x|
       "「" + x + "」"# collectメソッドで 「 」 で括った単語を集めて
     end.join(", ")# joinメソッドで ,(カンマ) 区切りでつなげる
-    boat = ""; boat2 = ""; boat3 = "";
+    boat = ""; boat2 = ""; boat3 = ""
     info[id]["bingo"].keys.each do |f|
       if /かもめ/ =~ f
         boat = '<img src="boat-0.png" width="450px" height="150px">'
@@ -86,23 +88,21 @@
 
 <body>
 <img src="../img/logo.png" width="900px" height="100px">
+<p>%s</p>
 <h1>%s</h1>
 <h2>%s</h2>
 <h2>%s</h2>
 <p>%s</p>
-<p>開けたパネル(%d/%d): %s</p>
+<p>開けたパネル(%d/%d)</p>
 <form action="?" method="GET">
-<p>%s: %s<br>
-<input type="submit" value="送信">
-<input type="reset" value="リセット"></p>
+<p class=jyama>%s: %s: %s: %s</p>
 </form>
 <p>%s</p>
-<div class="sea">
-<div>%s</div>
+<div class="boat">
 <div>%s</div>
 <div>%s</div>
-</div>
+<div>%s</div></div>
 </body></html>
 EOF
-         title, setumei, setumei2, hello, point, bingoword.length, bingos, guide, input, seikai, boat, boat2, boat3 )
+         umi, title, setumei, setumei2, hello, point, bingoword.length, guide, input, submit, reset, seikai, boat, boat2, boat3,)
 end

yatex.org