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

리버티게임, 모두가 만들어가는 자유로운 게임
백괴게임>Lemminkäinen
잔글편집 요약 없음
imported>재미로봇
잔글 (Regurus님 요청 (2))
 
(사용자 2명의 중간 판 35개는 보이지 않습니다)
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>
{{#ifeq:{{#count:{{CGI}}|A}}|0|A|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}A|A}}}} {{#ifeq:{{#count:{{CGI}}|B}}|0|B|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}B|B}}}} {{#ifeq:{{#count:{{CGI}}|C}}|0|C|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}C|C}}}} {{#ifeq:{{#count:{{CGI}}|D}}|0|D|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}D|D}}}} {{#ifeq:{{#count:{{CGI}}|E}}|0|E|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}E|E}}}} {{#ifeq:{{#count:{{CGI}}|F}}|0|F|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}F|F}}}} {{#ifeq:{{#count:{{CGI}}|G}}|0|G|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}G|G}}}} {{#ifeq:{{#count:{{CGI}}|H}}|0|H|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}H|H}}}} {{#ifeq:{{#count:{{CGI}}|I}}|0|I|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}I|I}}}} {{#ifeq:{{#count:{{CGI}}|J}}|0|J|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}J|J}}}} {{#ifeq:{{#count:{{CGI}}|K}}|0|K|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}K|K}}}} {{#ifeq:{{#count:{{CGI}}|L}}|0|L|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}L|L}}}} {{#ifeq:{{#count:{{CGI}}|M}}|0|M|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}M|M}}}} {{#ifeq:{{#count:{{CGI}}|N}}|0|N|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}N|N}}}} {{#ifeq:{{#count:{{CGI}}|O}}|0|O|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}O|O}}}} {{#ifeq:{{#count:{{CGI}}|P}}|0|P|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}P|P}}}} {{#ifeq:{{#count:{{CGI}}|Q}}|0|Q|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Q|Q}}}} {{#ifeq:{{#count:{{CGI}}|R}}|0|R|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}R|R}}}} {{#ifeq:{{#count:{{CGI}}|S}}|0|S|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}S|S}}}} {{#ifeq:{{#count:{{CGI}}|T}}|0|T|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}T|T}}}} {{#ifeq:{{#count:{{CGI}}|U}}|0|U|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}U|U}}}} {{#ifeq:{{#count:{{CGI}}|V}}|0|V|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}V|V}}}} {{#ifeq:{{#count:{{CGI}}|W}}|0|W|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}W|W}}}} {{#ifeq:{{#count:{{CGI}}|X}}|0|X|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}X|X}}}} {{#ifeq:{{#count:{{CGI}}|Y}}|0|Y|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Y|Y}}}} {{#ifeq:{{#count:{{CGI}}|Z}}|0|Z|{{CGI|{{#ifeq:{{CGI}}|0||{{CGI}}}}Z|Z}}}}
</div>
</div>
</big>
|번호가 잘못되었네만.}}
}}

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