%chris beauvais
%final project-las vegas rules blackjack
import GUI in "%oot/lib/GUI"
setscreen ("graphics:800;600")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% VARIABELS %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
var deck1 : array 1 .. 100 of int
var deck2 : array 1 .. 100 of int
var deck3 : array 1 .. 100 of int
var deck4 : array 1 .. 100 of int
var total, deck1card, deck2card, deck3card, deck4card : int
var spades, hearts, clubs, diamonds : int
var adder : real
var bet : real
var pot : real
pot := 1000
adder := 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DECKSTART %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
setscreen ("nocursor;noecho")
var x, y, button : int
randomize
procedure deckstart
for p : 1 .. 52
deck1 (p) := p
end for
for p : 1 .. 52
deck2 (p) := p
end for
for p : 1 .. 52
deck3 (p) := p
end for
for p : 1 .. 52
deck4 (p) := p
end for
end deckstart
procedure playgame
deckstart
randint (deck1card, 1, 52)
put deck1 (deck1card)
randint (deck2card, 1, 52)
put deck2 (deck2card)
randint (deck3card, 1, 52)
put deck3 (deck3card)
randint (deck4card, 1, 52)
put deck4 (deck4card)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ALL THE CARDS OF EACH DECK %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DECK1 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if deck1 (deck1card) = 1 then
Pic.ScreenLoad ("clubsace.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 2 then
Pic.ScreenLoad ("clubs2.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 3 then
Pic.ScreenLoad ("clubs3.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 4 then
Pic.ScreenLoad ("clubs4.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 5 then
Pic.ScreenLoad ("clubs5.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 6 then
Pic.ScreenLoad ("clubs6.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 7 then
Pic.ScreenLoad ("clubs7.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 8 then
Pic.ScreenLoad ("clubs8.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 9 then
Pic.ScreenLoad ("clubs9.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 10 then
Pic.ScreenLoad ("clubs10.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 11 then
Pic.ScreenLoad ("clubsjack.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 12 then
Pic.ScreenLoad ("clubsqueen.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 13 then
Pic.ScreenLoad ("clubsking.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 14 then
Pic.ScreenLoad ("diamondsace.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 15 then
Pic.ScreenLoad ("diamonds2.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 16 then
Pic.ScreenLoad ("diamonds3.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 17 then
Pic.ScreenLoad ("diamonds4.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 18 then
Pic.ScreenLoad ("diamonds5.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 19 then
Pic.ScreenLoad ("diamonds6.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 20 then
Pic.ScreenLoad ("diamonds7.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 21 then
Pic.ScreenLoad ("diamonds8.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 22 then
Pic.ScreenLoad ("diamonds9.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 23 then
Pic.ScreenLoad ("diamonds10.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 24 then
Pic.ScreenLoad ("diamondsjack.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 25 then
Pic.ScreenLoad ("diamondsqueen.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 26 then
Pic.ScreenLoad ("diamondsking.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 27 then
Pic.ScreenLoad ("spadesace.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 28 then
Pic.ScreenLoad ("spades2.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 29 then
Pic.ScreenLoad ("spades3.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 30 then
Pic.ScreenLoad ("spades4.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 31 then
Pic.ScreenLoad ("spades5.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 32 then
Pic.ScreenLoad ("spades6.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 33 then
Pic.ScreenLoad ("spades7.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 34 then
Pic.ScreenLoad ("spades8.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 35 then
Pic.ScreenLoad ("spades9.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 36 then
Pic.ScreenLoad ("spades10.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 37 then
Pic.ScreenLoad ("spadesjack.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 38 then
Pic.ScreenLoad ("spadesqueen.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 39 then
Pic.ScreenLoad ("spadesking.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 40 then
Pic.ScreenLoad ("heartsace.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 41 then
Pic.ScreenLoad ("hearts2.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 42 then
Pic.ScreenLoad ("hearts3.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 43 then
Pic.ScreenLoad ("hearts4.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 44 then
Pic.ScreenLoad ("hearts5.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 45 then
Pic.ScreenLoad ("hearts6.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 46 then
Pic.ScreenLoad ("hearts7.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 47 then
Pic.ScreenLoad ("hearts8.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 48 then
Pic.ScreenLoad ("hearts9.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 49 then
Pic.ScreenLoad ("hearts10.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 50 then
Pic.ScreenLoad ("heartsjack.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 51 then
Pic.ScreenLoad ("heartsqueen.bmp", 230, 0, picCopy)
elsif deck1 (deck1card) = 52 then
Pic.ScreenLoad ("heartsking.bmp", 230, 0, picCopy)
end if
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DECK2 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
randint (deck2card, 1, 52)
put deck2 (deck2card)
if deck2 (deck2card) = 1 then
Pic.ScreenLoad ("clubsace.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 2 then
Pic.ScreenLoad ("clubs2.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 3 then
Pic.ScreenLoad ("clubs3.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 4 then
Pic.ScreenLoad ("clubs4.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 5 then
Pic.ScreenLoad ("clubs5.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 6 then
Pic.ScreenLoad ("clubs6.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 7 then
Pic.ScreenLoad ("clubs7.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 8 then
Pic.ScreenLoad ("clubs8.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 9 then
Pic.ScreenLoad ("clubs9.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 10 then
Pic.ScreenLoad ("clubs10.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 11 then
Pic.ScreenLoad ("clubsjack.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 12 then
Pic.ScreenLoad ("clubsqueen.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 13 then
Pic.ScreenLoad ("clubsking.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 14 then
Pic.ScreenLoad ("diamondsace.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 15 then
Pic.ScreenLoad ("diamonds2.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 16 then
Pic.ScreenLoad ("diamonds3.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 17 then
Pic.ScreenLoad ("diamonds4.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 18 then
Pic.ScreenLoad ("diamonds5.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 19 then
Pic.ScreenLoad ("diamonds6.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 20 then
Pic.ScreenLoad ("diamonds7.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 21 then
Pic.ScreenLoad ("diamonds8.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 22 then
Pic.ScreenLoad ("diamonds9.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 23 then
Pic.ScreenLoad ("diamonds10.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 24 then
Pic.ScreenLoad ("diamondsjack.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 25 then
Pic.ScreenLoad ("diamondsqueen.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 26 then
Pic.ScreenLoad ("diamondsking.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 27 then
Pic.ScreenLoad ("spadesace.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 28 then
Pic.ScreenLoad ("spades2.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 29 then
Pic.ScreenLoad ("spades3.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 30 then
Pic.ScreenLoad ("spades4.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 31 then
Pic.ScreenLoad ("spades5.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 32 then
Pic.ScreenLoad ("spades6.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 33 then
Pic.ScreenLoad ("spades7.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 34 then
Pic.ScreenLoad ("spades8.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 35 then
Pic.ScreenLoad ("spades9.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 36 then
Pic.ScreenLoad ("spades10.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 37 then
Pic.ScreenLoad ("spadesjack.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 38 then
Pic.ScreenLoad ("spadesqueen.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 39 then
Pic.ScreenLoad ("spadesking.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 40 then
Pic.ScreenLoad ("heartsace.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 41 then
Pic.ScreenLoad ("hearts2.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 42 then
Pic.ScreenLoad ("hearts3.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 43 then
Pic.ScreenLoad ("hearts4.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 44 then
Pic.ScreenLoad ("hearts5.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 45 then
Pic.ScreenLoad ("hearts6.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 46 then
Pic.ScreenLoad ("hearts7.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 47 then
Pic.ScreenLoad ("hearts8.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 48 then
Pic.ScreenLoad ("hearts9.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 49 then
Pic.ScreenLoad ("hearts10.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 50 then
Pic.ScreenLoad ("heartsjack.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 51 then
Pic.ScreenLoad ("heartsqueen.bmp", 310, 0, picCopy)
elsif deck2 (deck2card) = 52 then
Pic.ScreenLoad ("heartsking.bmp", 310, 0, picCopy)
end if
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DECK3 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if deck3 (deck3card) = 1 then
Pic.ScreenLoad ("clubsace.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 2 then
Pic.ScreenLoad ("clubs2.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 3 then
Pic.ScreenLoad ("clubs3.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 4 then
Pic.ScreenLoad ("clubs4.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 5 then
Pic.ScreenLoad ("clubs5.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 6 then
Pic.ScreenLoad ("clubs6.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 7 then
Pic.ScreenLoad ("clubs7.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 8 then
Pic.ScreenLoad ("clubs8.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 9 then
Pic.ScreenLoad ("clubs9.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 10 then
Pic.ScreenLoad ("clubs10.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 11 then
Pic.ScreenLoad ("clubsjack.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 12 then
Pic.ScreenLoad ("clubsqueen.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 13 then
Pic.ScreenLoad ("clubsking.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 14 then
Pic.ScreenLoad ("diamondsace.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 15 then
Pic.ScreenLoad ("diamonds2.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 16 then
Pic.ScreenLoad ("diamonds3.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 17 then
Pic.ScreenLoad ("diamonds4.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 18 then
Pic.ScreenLoad ("diamonds5.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 19 then
Pic.ScreenLoad ("diamonds6.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 20 then
Pic.ScreenLoad ("diamonds7.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 21 then
Pic.ScreenLoad ("diamonds8.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 22 then
Pic.ScreenLoad ("diamonds9.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 23 then
Pic.ScreenLoad ("diamonds10.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 24 then
Pic.ScreenLoad ("diamondsjack.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 25 then
Pic.ScreenLoad ("diamondsqueen.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 26 then
Pic.ScreenLoad ("diamondsking.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 27 then
Pic.ScreenLoad ("spadesace.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 28 then
Pic.ScreenLoad ("spades2.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 29 then
Pic.ScreenLoad ("spades3.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 30 then
Pic.ScreenLoad ("spades4.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 31 then
Pic.ScreenLoad ("spades5.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 32 then
Pic.ScreenLoad ("spades6.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 33 then
Pic.ScreenLoad ("spades7.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 34 then
Pic.ScreenLoad ("spades8.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 35 then
Pic.ScreenLoad ("spades9.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 36 then
Pic.ScreenLoad ("spades10.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 37 then
Pic.ScreenLoad ("spadesjack.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 38 then
Pic.ScreenLoad ("spadesqueen.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 39 then
Pic.ScreenLoad ("spadesking.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 40 then
Pic.ScreenLoad ("heartsace.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 41 then
Pic.ScreenLoad ("hearts2.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 42 then
Pic.ScreenLoad ("hearts3.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 43 then
Pic.ScreenLoad ("hearts4.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 44 then
Pic.ScreenLoad ("hearts5.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 45 then
Pic.ScreenLoad ("hearts6.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 46 then
Pic.ScreenLoad ("hearts7.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 47 then
Pic.ScreenLoad ("hearts8.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 48 then
Pic.ScreenLoad ("hearts9.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 49 then
Pic.ScreenLoad ("hearts10.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 50 then
Pic.ScreenLoad ("heartsjack.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 51 then
Pic.ScreenLoad ("heartsqueen.bmp", 460, 460, picCopy)
elsif deck3 (deck3card) = 52 then
Pic.ScreenLoad ("heartsking.bmp", 460, 460, picCopy)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DECK4 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if deck4 (deck4card) = 1 then
Pic.ScreenLoad ("clubsace.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 2 then
Pic.ScreenLoad ("clubs2.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 3 then
Pic.ScreenLoad ("clubs3.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 4 then
Pic.ScreenLoad ("clubs4.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 5 then
Pic.ScreenLoad ("clubs5.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 6 then
Pic.ScreenLoad ("clubs6.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 7 then
Pic.ScreenLoad ("clubs7.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 8 then
Pic.ScreenLoad ("clubs8.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 9 then
Pic.ScreenLoad ("clubs9.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 10 then
Pic.ScreenLoad ("clubs10.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 11 then
Pic.ScreenLoad ("clubsjack.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 12 then
Pic.ScreenLoad ("clubsqueen.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 13 then
Pic.ScreenLoad ("clubsking.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 14 then
Pic.ScreenLoad ("diamondsace.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 15 then
Pic.ScreenLoad ("diamonds2.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 16 then
Pic.ScreenLoad ("diamonds3.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 17 then
Pic.ScreenLoad ("diamonds4.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 18 then
Pic.ScreenLoad ("diamonds5.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 19 then
Pic.ScreenLoad ("diamonds6.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 20 then
Pic.ScreenLoad ("diamonds7.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 21 then
Pic.ScreenLoad ("diamonds8.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 22 then
Pic.ScreenLoad ("diamonds9.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 23 then
Pic.ScreenLoad ("diamonds10.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 24 then
Pic.ScreenLoad ("diamondsjack.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 25 then
Pic.ScreenLoad ("diamondsqueen.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 26 then
Pic.ScreenLoad ("diamondsking.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 27 then
Pic.ScreenLoad ("spadesace.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 28 then
Pic.ScreenLoad ("spades2.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 29 then
Pic.ScreenLoad ("spades3.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 30 then
Pic.ScreenLoad ("spades4.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 31 then
Pic.ScreenLoad ("spades5.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 32 then
Pic.ScreenLoad ("spades6.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 33 then
Pic.ScreenLoad ("spades7.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 34 then
Pic.ScreenLoad ("spades8.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 35 then
Pic.ScreenLoad ("spades9.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 36 then
Pic.ScreenLoad ("spades10.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 37 then
Pic.ScreenLoad ("spadesjack.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 38 then
Pic.ScreenLoad ("spadesqueen.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 39 then
Pic.ScreenLoad ("spadesking.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 40 then
Pic.ScreenLoad ("heartsace.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 41 then
Pic.ScreenLoad ("hearts2.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 42 then
Pic.ScreenLoad ("hearts3.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 43 then
Pic.ScreenLoad ("hearts4.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 44 then
Pic.ScreenLoad ("hearts5.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 45 then
Pic.ScreenLoad ("hearts6.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 46 then
Pic.ScreenLoad ("hearts7.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 47 then
Pic.ScreenLoad ("hearts8.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 48 then
Pic.ScreenLoad ("hearts9.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 49 then
Pic.ScreenLoad ("hearts10.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 50 then
Pic.ScreenLoad ("heartsjack.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 51 then
Pic.ScreenLoad ("heartsqueen.bmp", 310, 132, picCopy)
elsif deck4 (deck4card) = 52 then
Pic.ScreenLoad ("heartsking.bmp", 310, 132, picCopy)
end if
end if
end playgame
Pic.ScreenLoad ("blackjackbackground.bmp", 0, 0, picCopy)
Pic.ScreenLoad ("bettingchips.bmp", 600, 15, picCopy)
playgame
loop
Mouse.Where (x, y, button)
locate (1, 1)
put x, " ", y
if button = 1 then
if (x > 614 and x < 651) and (y > 72 and y < 112) then
Pic.ScreenLoad ("bettingvalue1.bmp", 130, 125, picCopy)
elsif (x > 649 and x < 684) and (y > 25 and y < 67) then
Pic.ScreenLoad ("bettingvalue5.bmp", 120, 40, picCopy)
elsif (x > 686 and x < 720) and (y > 65 and y < 125) then
Pic.ScreenLoad ("bettingvalue25.bmp", 47, 50,
picCopy)
elsif (x > 716 and x < 741) and (y > 25 and y < 62)
then
Pic.ScreenLoad ("bettingvalue100.bmp", 58,
135, picCopy)
end if
end if
end loop
%%%%%%%%%%%%%%%%%%%%
% Buttons %
%%%%%%%%%%%%%%%%%%%%
|