summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page
blob: 6f5508d3e9abe40e2eea1dc9695854fa18abbc35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<%@ Title="Hangman Game" %>
<com:TContent ID="body">

<h1>Hangman Game</h1>

<com:TMultiView ID="GameMultiView">

<com:TView ID="IntroView">
<p>This is the game of Hangman. You must guess a word, a letter at a time.
If you make too many mistakes, you lose the game!</p>
<com:TRadioButtonList ID="LevelSelection">
  <com:TListItem Value="10" Text="Easy game; you are allowed 10 misses."/>
  <com:TListItem Value="5" Text="Medium game; you are allowed 5 misses."/>
  <com:TListItem Value="3" Text="Hard game; you are allowed 3 misses."/>
</com:TRadioButtonList>
<com:TButton Text="Play!" OnClick="selectLevel" />
<com:TLabel ID="LevelError" Text="You must choose a difficulty level!" ForeColor="red" Visible="false" />
</com:TView>

<com:TView ID="GuessView">
<h2>Please make a guess</h2>
<h3 style="letter-spacing: 4px;"><%= $this->Page->GuessWord %></h3>
<p>You have made <%=$this->Page->Misses %> bad guesses
out of a maximum of <%= $this->Page->Level %>.</p>
<p>Guess:
<com:TLinkButton ID="GuessA" Text="A" OnClick="guessWord" />
<com:TLinkButton ID="GuessB" Text="B" OnClick="guessWord" />
<com:TLinkButton ID="GuessC" Text="C" OnClick="guessWord" />
<com:TLinkButton ID="GuessD" Text="D" OnClick="guessWord" />
<com:TLinkButton ID="GuessE" Text="E" OnClick="guessWord" />
<com:TLinkButton ID="GuessF" Text="F" OnClick="guessWord" />
<com:TLinkButton ID="GuessG" Text="G" OnClick="guessWord" />
<com:TLinkButton ID="GuessH" Text="H" OnClick="guessWord" />
<com:TLinkButton ID="GuessI" Text="I" OnClick="guessWord" />
<com:TLinkButton ID="GuessJ" Text="J" OnClick="guessWord" />
<com:TLinkButton ID="GuessK" Text="K" OnClick="guessWord" />
<com:TLinkButton ID="GuessL" Text="L" OnClick="guessWord" />
<com:TLinkButton ID="GuessM" Text="M" OnClick="guessWord" />
<com:TLinkButton ID="GuessN" Text="N" OnClick="guessWord" />
<com:TLinkButton ID="GuessO" Text="O" OnClick="guessWord" />
<com:TLinkButton ID="GuessP" Text="P" OnClick="guessWord" />
<com:TLinkButton ID="GuessQ" Text="Q" OnClick="guessWord" />
<com:TLinkButton ID="GuessR" Text="R" OnClick="guessWord" />
<com:TLinkButton ID="GuessS" Text="S" OnClick="guessWord" />
<com:TLinkButton ID="GuessT" Text="T" OnClick="guessWord" />
<com:TLinkButton ID="GuessU" Text="U" OnClick="guessWord" />
<com:TLinkButton ID="GuessV" Text="V" OnClick="guessWord" />
<com:TLinkButton ID="GuessW" Text="W" OnClick="guessWord" />
<com:TLinkButton ID="GuessX" Text="X" OnClick="guessWord" />
<com:TLinkButton ID="GuessY" Text="Y" OnClick="guessWord" />
<com:TLinkButton ID="GuessZ" Text="Z" OnClick="guessWord" />
</p>
<p><com:TLinkButton Text="Give up?" OnClick="giveUp" /></p>
</com:TView>

<com:TView ID="WinView">
<h2>You Win!</h2>
<p>The word was: <%= $this->Page->Word %>.</p>
<p><com:TLinkButton Text="Start Again" OnClick="startAgain" /></p>
</com:TView>

<com:TView ID="LoseView">
<h2>You Lose!</h2>
<p>The word was: <%= $this->Page->Word %>.</p>
<p><com:TLinkButton Text="Start Again" OnClick="startAgain" /></p>
</com:TView>

</com:TMultiView>

</com:TContent>