+ my $clients = {};
+ my $jankenStat = 0;
+ my $handItem = {'✊'=> 0, '✌'=> 1, '✋'=> 2};
+ my $handArray = [sort {$handItem->{$a} <=> $handItem->{$b}} keys %$handItem];
+ my $hand = {};
+ my $win = '';
+ my $cpname = 'ちゃぼ';
+ my $DEBUG = 0;
+
+ $self->stash->{hand} = $handArray;
- my $clients = {};
- my $jankenStat = 0;
- my $handItem = {'✊'=> 0, '✌'=> 1, '✋'=> 2};
- my $handArray = [sort {$handItem->{$a} <=> $handItem->{$b}} keys %$handItem];
- my $hand = {};
- my $win = '';
- my $cpname = 'ちゃぼ';
- my $DEBUG = 0;
- ws.send($('#name').val() + "\t" + '✊');
+ ws.send($('#name').val() + "\t" + '<%== $hand->[0] %>');
- ws.send($('#name').val() + "\t" + '✌');
+ ws.send($('#name').val() + "\t" + '<%== $hand->[1] %>');
- ws.send($('#name').val() + "\t" + '✋');
+ ws.send($('#name').val() + "\t" + '<%== $hand->[2] %>');
- <button type="button" id="gu"><font size=50>✊</font></button>
- <button type="button" id="choki"><font size=50>✌</font></button>
- <button type="button" id="pa"><font size=50>✋</font></button>
+ <button type="button" id="gu"><font size=50><%== $hand->[0] %></font></button>
+ <button type="button" id="choki"><font size=50><%== $hand->[1] %></font></button>
+ <button type="button" id="pa"><font size=50><%== $hand->[2] %></font></button>