Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2005, 06:24 PM
Registered User
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default High Low Card Game

I have a imagelist with 52 images of cards; the 0 image is the back of the card. I am displaying a random card in the computer's image box and the player's image box. But how can i make the computer understand what these cards are and which is higher??!!
 
Old September 23rd, 2005, 01:21 PM
Authorized User
 
Join Date: May 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There are literally thousands of ways to accomplish this.

One way off the top of my head is to organize the cards in your imagelist from lowest value to highest: for example, index 1 thru 4 would be the various dueces, and 5-8 would be the three's etc. When you assign the cards to a hand, keep track of the indices that were selected, and compare the respective values: indices 1 thru 4 would have a repsective value of 1, indices 5-8 would have a respective value of 2, and so on... The higher the respective value, the higher the card is...








Similar Threads
Thread Thread Starter Forum Replies Last Post
High Cpu usage Cruz_240sx Classic ASP Components 2 March 20th, 2007 06:42 AM
Very high XSL Problem markus2000 XSLT 2 June 8th, 2006 04:51 PM
Check for items with low values adias SQL Language 0 May 5th, 2006 02:01 PM
"Found a low surrogate char without a preceding hi rosalynb VS.NET 2002/2003 6 May 18th, 2004 06:48 PM
Page Faults High niallhannon SQL Server 2000 1 February 25th, 2004 05:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.