Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
poker
Author Message
spazobo

Posted: Fri Jun 04, 2004 11:33 am   Post subject: poker

hi there....i need help in making a poker game..this is what i have so far..the positions are wrong but the basis is right..i need to know how to make the cards show up on the screen

var suit : int
var card1 : int
var card2 : int
var card3 : int
var card4 : int

proc clubs (loc : int)

for count : 1 .. 10
for x : 60 .. 540 by 100
drawbox (x, 190, x + 100, 290, 7)
drawfillbox (x + 1, 191, x + 99, 289, 0)
end for

randint (card1, 1, 13)

if card1 = 1 then

elsif card1 = 2 then

elsif card1 = 3 then

elsif card1 = 4 then

elsif card1 = 5 then

elsif card1 = 6 then

elsif card1 = 7 then

elsif card1 = 8 then

elsif card1 = 9 then

elsif card1 = 10 then

elsif card1 = 11 then

elsif card1 = 12 then

elsif card1 = 13 then
delay (20)
end if
end for
end clubs

proc diamonds

for count : 1 .. 500
for x : 60 .. 540 by 100
drawbox (x, 190, x + 100, 290, 7)
drawfillbox (x + 101, 191, x + 199, 289, 0)
end for

randint (card2, 1, 13)

if card2 = 1 then

elsif card2 = 2 then

elsif card2 = 3 then

elsif card2 = 4 then

elsif card2 = 5 then

elsif card2 = 6 then

elsif card2 = 7 then

elsif card2 = 8 then

elsif card2 = 9 then

elsif card2 = 10 then

elsif card2 = 11 then

elsif card2 = 12 then

elsif card2 = 13 then
delay (20)
end if
end for
end diamonds

proc hearts

for count : 1 .. 500
for x : 60 .. 540 by 100
drawbox (x, 190, x + 100, 290, 7)
drawfillbox (x + 201, 191, x + 299, 289, 0)
end for

randint (card3, 1, 13)

if card3 = 1 then

elsif card3 = 2 then

elsif card3 = 3 then

elsif card3 = 4 then

elsif card3 = 5 then

elsif card3 = 6 then

elsif card3 = 7 then

elsif card3 = 8 then

elsif card3 = 9 then

elsif card3 = 10 then

elsif card3 = 11 then

elsif card3 = 12 then

elsif card3 = 13 then
delay (20)
end if
end for
end hearts

for count : 1 .. 500
for x : 60 .. 540 by 100
drawbox (x, 190, x + 100, 290, 7)
drawfillbox (x + 301, 191, x + 399, 289, 0)
end for

randint (card4, 1, 13)

if card4 = 1 then

elsif card4 = 2 then

elsif card4 = 3 then

elsif card4 = 4 then

elsif card4 = 5 then

elsif card4 = 6 then

elsif card4 = 7 then

elsif card4 = 8 then

elsif card4 = 9 then

elsif card4 = 10 then

elsif card4 = 11 then

elsif card4 = 12 then

elsif card4 = 13 then
delay (20)
end if
end for

proc select (var loc : int)

for i : 1 .. 5
loc := 50
randint (suit, 1, 4)
if suit = 1 then
clubs (loc)
elsif suit = 2 then
diamonds
elsif suit = 3 then
hearts
elsif suit = 4 then
end if
loc += 100
end for
end select

Cervantes

Posted: Fri Jun 04, 2004 3:16 pm   Post subject: (No subject)

check the Tidbits and Tricks thread. in the first post, Asian shows us how to load up a lot of pictures (like you are doing here) easily.

if you want to keep going your way, I wouldn't recommend using Pic.ScreenLoad. use Pic.FileNew() to assaign a variable to each of your pictures, then use Pic.Draw() to draw it.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 2 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: