행맨/시작: 두 판 사이의 차이

리버티게임, 모두가 만들어가는 자유로운 게임
백괴게임>Lemminkäinen
잔글 (CGI2 간단해지면 그때 돌아올 것 같습니다)
imported>재미로봇
잔글 (Regurus님 요청 (2))
 
(사용자 2명의 중간 판 36개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{#vardefine:word|RABBIT}}
{{#css:
<big>
.hang, .alphabets, .words{ font-size:200%; }
.alphabets{border: 1px solid #aaa;    background-color: #eee;    padding: 0.1em 1em;}
.alphabets p{margin:0;}
.alphabets div{font-size:1.1rem;}
.alphabets div a{border-radius:0;}
.alphabets >p>span{
    width: 1.5em;
    display: inline-block;
    text-align: center;
}
.alphabets div a>span:hover {
    border-radius: 0;
    display:inline-block;
}
.alphabets a:hover{text-decoration:none;}
.alphabets a>span:hover{
    background: #5a5a5a;
    border-radius: 50%;
    color: #fff !important;
}
.alphabets a, .alphabets a>span{display:block;}
.words span{
    width: 1.5em;
    display: inline-block;
    background-color: #fafafa;
    border: 1px solid #a9b9df;
    border-radius: 10px;
    text-align: center;
    margin-left: 0.4em;
}
}}
{{#vardefine:gameno|{{CGI2|변수=gameno}}}}
{{#iferror:{{#expr:{{#var:gameno}}+1}}|정상적인 경로가 아니라네.|{{#ifexpr:{{#var:gameno}}<={{:행맨/단어|max}}
|{{#vardefine:word|{{:행맨/단어|{{#var:gameno}}}}}}
{{#vardefine:getWrong|0}}{{#vardefine:getRight|0}}
{{#ifeq:{{CGI}}|0||
{{loop|<nowiki>{{#ifeq:{{#count:{{#var:word}}|{{#sub:{{CGI}}|{{{index}}}|1}}}}|0|{{#vardefine:getWrong|{{#expr:{{#var:getWrong}}+1}}}}|}}</nowiki>|{{#expr:{{#len:{{CGI}}}}-1}}|1|0}}
}}
<div class='hang'>
{{#switch:{{#var:getWrong}}
|0=<pre>
------
      |
      |
      |
</pre>
|1=<pre>
------
  o  |
      |
      |
</pre>
|2=<pre>
------
  o  |
  |  |
      |
</pre>
|3=<pre>
------
  o  |
-|-  |
      |
</pre>
|4=<pre>
  ------
  ------
   o  |
   o  |
  -|-  |
  -|-  |
  /|  |
  /|  |
<div>
</pre>
{{#ifeq:{{#count:{{CGI}}|R}}|0|_|R}}
|5=<pre>
{{#ifeq:{{#count:{{CGI}}|A}}|0|_|A}}
------
{{#ifeq:{{#count:{{CGI}}|B}}|0|_|B}}
  o/  |
{{#ifeq:{{#count:{{CGI}}|B}}|0|_|B}}
-|-  |
{{#ifeq:{{#count:{{CGI}}|I}}|0|_|I}}
/|  |
{{#ifeq:{{#count:{{CGI}}|T}}|0|_|T}}
</pre>
|6=<pre>
------
  o/  |
/|\  |
/|   |
</pre>
|#default=
No cheating please.
}}
</div>
<div class='words'><!--주의:중복 알파벳의 가능성이 있어, getRight은 string길이-getWrong으로 계산하지 않습니다.-->
{{loop|<nowiki><span>{{#ifeq:{{#count:{{CGI}}|{{#sub:{{#var:word}}|{{{index}}}|1}}}}|0|&nbsp;|{{#sub:{{#var:word}}|{{{index}}}|1}} {{#vardefine:getRight|{{#expr:{{#var:getRight}}+1}}}}}}</span></nowiki>|{{#expr:{{#len:{{#var:word}}}}-1}}|1|0}}
</div>
</div>
<!--Generated with JS code
<div class='alphabets'>
var str="";
{{#ifeq:{{#var:getRight}}|{{#len:{{#var:word}}}}|<div>축하한다. 행맨 게임에서 생존했다.
var format="{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}@|@}} ";
* {{linkget|행맨/시작|한 판 더!|get=gameno={{rand|0|{{#expr:{{:행맨/단어|max}}+0}}}}}}</div>|{{#ifeq:{{#var:getWrong}}|6|<div>[[너는 죽었다|너는 죽었다.]] 답: '''{{#var:word}}'''
for(let i=65;i<(65+26);i++){
* {{linkget|행맨/시작|다시 하겠는가?|get=gameno={{rand|0|{{#expr:{{:행맨/단어|max}}+0}}}}}} </div>|
let char=String.fromCharCode(i);
{{loop|<nowiki>{{#ifeq:{{#count:{{CGI}}|{{알파벳|{{{index}}}}}}}|0|{{Linkget||{{알파벳|{{{index}}}}}|get=offset={{#ifeq:{{CGI}}|0|{{알파벳|{{{index}}}}}|{{CGI}}{{알파벳|{{{index}}}}}}}&gameno={{#var:gameno}}}} |<span>{{알파벳|{{{index}}}}}</span>}}</nowiki> |52|1|27}}
str+=format.replace(/@/g,char);
}}}}
}
-->
<div>
{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}A|A}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}B|B}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}C|C}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}D|D}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}E|E}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}F|F}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}G|G}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}H|H}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}I|I}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}J|J}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}K|K}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}L|L}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}M|M}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}N|N}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}O|O}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}P|P}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Q|Q}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}R|R}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}S|S}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}T|T}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}U|U}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}V|V}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}W|W}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}X|X}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Y|Y}} {{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Z|Z}}
</div>
</div>
</big>
|번호가 잘못되었네만.}}
}}

2020년 8월 31일 (월) 23:42 기준 최신판