15,908,634 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by JLSto (Top 6 by date)
JLSto
9-Feb-15 2:36am
View
Hi there, thanks for your reply, I haven't had much time to look at the link, been very busy with work, So its basically just the same as creating your own, except you don't have to do all the typing ?
JLSto
14-Apr-14 17:33pm
View
I need a little more help, I am nearly done and I have figured out how to display the randomly generated cards, but I now need to calculate the players score in the player class but im not to sure what I can do here, I need to retrieve the randomly selected card value that was stored ... I have just sent the relevant code.
This is my deck class...
Public Class Deck
Dim c As Card = New Card()
Dim deckOfCards As List(Of KeyValuePair(Of String, Integer))
Public Function RandomCards(ByVal min As Integer, ByVal max As Integer) As Integer
Static generator As System.Random = New System.Random()
Return generator.Next(min, max)
End Function
Public Function dealCard()
Dim card As String
Dim scoreValue As Integer
deckOfCards = c.cardValues()
Dim ranCard As Integer = RandomCards(0, deckOfCards.Count - 1)
card = deckOfCards(ranCard).Key
' I declared this for the sake of returning in to the calculateScore value but im really not to sure what im doing.
scoreValue = deckOfCards(ranCard).Value
Return card
End Function
End Class
And this is my player class...
Public Class Player
Public playerScore As Integer = 0
Public wins As Integer = 0
Public losses As Integer = 0
Public ties As Integer = 0
Public Function calculateScore(ByRef scoreVale As Integer)
Dim randCard As Integer
randCard = "This needs to be the randomly selected cards value that was stored in the 'KeyValuPpare'"
playerScore += randCard
Return playerScore
End Function
End Class
JLSto
11-Apr-14 11:24am
View
Thanks that was very helpful, and I enjoyed your explanations.
JLSto
11-Apr-14 7:45am
View
Thanks a lot man, this really helps me a lot, there is a bit more I would like to ask, but first I just want to thank you for helping me and giving me good criticism and not just turning away.
so here goes my questions...
1. how would I link my different images to each card (eg. 0 : SpadeAce : 11) how would I link the ace card image to this ?
If you could help it would be great, maby evan an email ?
JLSto
18-Feb-14 7:20am
View
Thank you very much for your time, ill give that tutorial a go and let you know how things go
JLSto
18-Feb-14 7:01am
View
Im very new to the programming world, what is a repeating object ? and what developer tools ?
Show More