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

리버티게임, 모두가 만들어가는 자유로운 게임
백괴게임>Lemminkäinen
잔글편집 요약 없음
imported>재미로봇
잔글 (Regurus님 요청 (2))
 
(사용자 2명의 중간 판 33개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{#vardefine:word|R A B B I T}}<!--for explode-->
{{#css:
{{#vardefine:wordcomp|{{#replace:{{#var:word}}| |}}}}<!--for general purpose-->
.hang, .alphabets, .words{ font-size:200%; }
<big>
.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>
{{loop|{{#ifeq:{{#count:{{CGI}}|{{#explode:{{#var:word}}| |{{{index}}}}}}}|0|_|{{#explode:{{#var:word}}| |{{{index}}}}}}} |{{#expr:{{#len:{{#var:wordcomp}}}}-1}}|1|0}}
|5=<pre>
------
  o/  |
-|-  |
/|  |
</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="{{#ifeq:{{#count:{{CGI}}|@}}|0|{{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>
{{#ifeq:{{#count:{{CGI}}|A}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}A|A}}|A}} {{#ifeq:{{#count:{{CGI}}|B}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}B|B}}|B}} {{#ifeq:{{#count:{{CGI}}|C}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}C|C}}|C}} {{#ifeq:{{#count:{{CGI}}|D}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}D|D}}|D}} {{#ifeq:{{#count:{{CGI}}|E}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}E|E}}|E}} {{#ifeq:{{#count:{{CGI}}|F}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}F|F}}|F}} {{#ifeq:{{#count:{{CGI}}|G}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}G|G}}|G}} {{#ifeq:{{#count:{{CGI}}|H}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}H|H}}|H}} {{#ifeq:{{#count:{{CGI}}|I}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}I|I}}|I}} {{#ifeq:{{#count:{{CGI}}|J}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}J|J}}|J}} {{#ifeq:{{#count:{{CGI}}|K}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}K|K}}|K}} {{#ifeq:{{#count:{{CGI}}|L}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}L|L}}|L}} {{#ifeq:{{#count:{{CGI}}|M}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}M|M}}|M}} {{#ifeq:{{#count:{{CGI}}|N}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}N|N}}|N}} {{#ifeq:{{#count:{{CGI}}|O}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}O|O}}|O}} {{#ifeq:{{#count:{{CGI}}|P}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}P|P}}|P}} {{#ifeq:{{#count:{{CGI}}|Q}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Q|Q}}|Q}} {{#ifeq:{{#count:{{CGI}}|R}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}R|R}}|R}} {{#ifeq:{{#count:{{CGI}}|S}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}S|S}}|S}} {{#ifeq:{{#count:{{CGI}}|T}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}T|T}}|T}} {{#ifeq:{{#count:{{CGI}}|U}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}U|U}}|U}} {{#ifeq:{{#count:{{CGI}}|V}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}V|V}}|V}} {{#ifeq:{{#count:{{CGI}}|W}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}W|W}}|W}} {{#ifeq:{{#count:{{CGI}}|X}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}X|X}}|X}} {{#ifeq:{{#count:{{CGI}}|Y}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Y|Y}}|Y}} {{#ifeq:{{#count:{{CGI}}|Z}}|0|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Z|Z}}|Z}}
</div>
</div>
</big>
|번호가 잘못되었네만.}}
}}

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