Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Card dealing

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  

Did this help you?
Yes
0%
 0%  [ 0 ]
No
100%
 100%  [ 1 ]
Too confusing
0%
 0%  [ 0 ]
Total Votes : 1

Author Message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Sat Nov 22, 2008 7:42 pm    Post subject: Card dealing Reply with quote

Recently, I was asked about a linked list by a friend (he is still learning c). Told him about it and didn't have an example of a use. The c class I'm in has a homework problem that wants use to modify a card dealing program. I looked at it and hated how the author did it. So i re-wrote the whole thing. It uses a stack and linked list. I just sent it to him so he can learn from it. I've noticed that there are a lot of beginners in the c language on this forum. So I thought that it probably would help some people here.

Things to get out of the source:
*linked list and a stack
*use of pointers
*allocation of memory
*handling bits

If you have any questions, don't be scared to ask.



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sat Nov 22, 2008 9:29 pm    Post subject: Reply with quote

What do you use the stack for? Seems like a queue would be better suited to the problem.
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Sat Nov 22, 2008 9:42 pm    Post subject: Reply with quote

I wanted to simulate a real deck of cards, so I wanted the deck to be faced down. A stack would be suited for it. If a queue was used, the first one in will be the first one out. To me, that would be the deck faced up. It's really up to the programmer really.
Back to top
View user's profile Send private message
IllusionSlayer
Grandmaster Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 539

PostPosted: Sat Nov 22, 2008 11:26 pm    Post subject: Reply with quote

what language is this in?
_________________


Last edited by Dark_Byte on Fri Feb 13, 2010 13:10 pm; edited 94 times in total
Back to top
View user's profile Send private message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Sat Nov 22, 2008 11:27 pm    Post subject: Reply with quote

It was done in c.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites