\documentclass{jarticle}
% ascmac$B$r;H$&$H(Bscreen$B4D6-$G4]OH$,;H$($k$h$&$K$J$k!#$G!"(Busepackage$B$9$k!#(B
\usepackage{ascmac}


%$BJ8=q$N%?%$%H%k$r;XDj$9$k(B
\title{blackjack - 5}

%$BJ8=q$NCx<T$r;XDj$9$k(B
\author{c103345 $B%/%i%9(B11\\$B8x1WB@O:(B}

%$B<!$N9T$+$i$,K\J8$N3+;O(B
\begin{document}
\maketitle			% $B$3$3(B($B$D$^$jJ8=q@hF,(B)$B$K%?%$%H%k$r=PNO(B
\section{$BLdBj(B}			% $B:G=i$N%;%/%7%g%s$O!VLdBj!W(B

$B2]BjCf$NLdBjHV9f(B5$BHV(B

\begin{itemize}
 \item $B%+!<%I$N2hLLI=<($r$b$C$H$_$d$9$/$-$l$$$K$9$k(B
\end{itemize}

$B$rA*Br$7$?!#(B

\section{$B:n@.$7$?%W%m%0%i%`(B}

$B:#2s:n@.$7$?%W%m%0%i%`$O0J2<$NDL$j!#(B

% verbatim$B4D6-$OCfL#$r86J8$=$N$^$^AHHG$9$k(B
% $B:n$C$?(BRuby$B%W%m%0%i%`$r$=$N$^$^$3$3$K:9$79~$a$P$h$$!#(B
\begin{verbatim}
#!/usr/koeki/bin/ruby
# coding: utf-8

def createCardsHashArray()
 card = Array.new		# $B6u$NG[Ns$r:n$k(B
 for suit in ["$B%O!<%H(B", "$B%9%Z!<%I(B", "$B%@%$%d(B", "$B%/%i%V(B"]
   card << {"suit" => suit, "n" => "A"}
   # $B$3$3$GBeF~$7$F$$$k$N$,%O%C%7%e(B
   2.upto(10) do |n|
     card << {"suit" => suit, "n" => n.to_s}
   end
   for n in ["J", "Q", "K"]
     card << {"suit" => suit, "n" => n}
   end
 end
 card				# $B:G8e$K(B card$BG[Ns(B $B$r8F$S<g$KJV$9(B
end

 $B!A!A!A8+K\$J$N$GCfN,!A!A!A(B

if pp > cp		# $B%3%s%T%e!<%?$h$jE@$,9b$1$l$P(B
 puts "$B$"$J$?$N>!$A$G$9!#;2$j$^$7$?(B!"
else			# $B$=$&$G$J$1$l$P(B($B0z$-J,$14^$`(B)
 puts "$B$o$?$7$N>!$A$G$9!#$Y$m$Y$m$P$"!A(B"
end
\end{verbatim}
% verbatim$B4D6-=*$o$j(B

\section{$B<B9TNc(B}

$B<B:]$K%W%m%0%i%`$rF0$+$7$F$_$?!#0J2<$N$h$&$K$J$C$?!#(B

\begin{screen}			% \usepackage{ascmac}$B$,I,MW(B
\begin{verbatim}
% ./blackjack.rb
$B$o$?$7$N<j(B:
  [ ??? ]
$B%/%i%V(B $B$N(B A
$B$"$J$?$N<j(B:
$B%O!<%H(B $B$N(B 4
$B%/%i%V(B $B$N(B 3
$B:#$N$"$J$?$NE@$O(B 7$BE@(B $B$G$9!#(B
$B$b$&0lKg0z$-$^$9$+(B?(y$B$+(Bn$B$G(B) y
$B$b$&0lKg0z$-$^$9!#0z$$$?%+!<%I$O$3$l$G$9!#(B
$B%O!<%H(B $B$N(B K
$B:#$N$"$J$?$NE@$O(B 17$BE@(B $B$G$9!#(B
$B$b$&0lKg0z$-$^$9$+(B?(y$B$+(Bn$B$G(B) n
$B>!Ii(B!
$B$o$?$7$N<j(B:
$B%/%i%V(B $B$N(B 10
$B%/%i%V(B $B$N(B A
$B$"$J$?$N<j(B:
$B%O!<%H(B $B$N(B 4
$B%/%i%V(B $B$N(B 3
$B%O!<%H(B $B$N(B K
$B$o$?$7(B 21 : 17 $B$"$J$?(B
$B$o$?$7$N>!$A$G$9!#$Y$m$Y$m$P$"!A(B
\end{verbatim}
\end{screen}

\section{$B%W%m%0%i%`$N2r@b(B}

$B:#2s$N2]Bj$G2~NI$r2C$($?$N$O0J2<$NItJ,$G$"$k!#(B

\begin{verbatim}
printf("$B:#$N$"$J$?$NE@$O(B %d$BE@(B $B$G$9!#(B\n", point(player))
\end{verbatim}

point(player) $B$K$h$C$F%W%l%$%d!<$NF@E@$,J,$+$k!#(B
$B$3$l$r$D$M$KI=<($9$k$h$&$K$7$?!#$3$l$K$h$j!"%W%l(B
$B%$%d!<(B($B?M4V(B)$B$,$b$&0lKg<h$k$+$I$&$+$NH=CG$r2<$9$N(B
$B$,MF0W$K$J$k!#(B


\section{$B46A[(B}

$B<B:]$K%W%m%0%i%`$r:n$C$F!"<+J,$GM7$s$G$$$k$H$-$K!"(B
$B0E;;$,6l<j$J$N$GM7$V$@$1$GF,$r;H$C$F$X$H$X$H$K$J$C(B
$B$F$7$^$C$?!#B-$7$?7k2L$rI=<($7$?$i$H$F$b3Z$A$s$G(B
$BL@F|$+$iL@$k$$?M@8$,Aw$l$=$&$J5$$,$7$F$-$?!#(B

$B;~4V$,$"$C$?$i%Z!<%8%o%s$r:n$C$F$_$?$$!#$7$+$7(B
$B%k!<%k$,$h$/J,$+$i$J$$(B({\small $B$*$$(B})$B!#(B
UNO$B$G$b3Z$7$=$&$@!#$7$+$7$I$N%+!<%I$,2?Kg$"$k$N(B
$B$+CN$i$J$$(B({\small $B$3$i(B})$B!#(B

\end{document}
