Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
card 2
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { } } class Deck { private Card[] cards; public Deck() { cards = new Card[52]; int check = 0; for (int suitVal = 1; suitVal < 4; suitVal++) { for (int rankVal = 1; rankVal < 14; rankVal++) { if(suitVal == 1) { cards[check] = new Card(rankVal, "Spades"); } else if (suitVal == 2) { cards[check] = new Card(rankVal, "Hearts"); } else if (suitVal == 3) { cards[check] = new Card(rankVal, "Clubs"); } else if (suitVal == 4) { cards[check] = new Card(rankVal, "Diamonds"); } } } } } }
run
|
edit
|
history
|
help
0
nthFromLastElement
D110
HourCouter
last ie
Custom thousand separator
Overloading == operator (for comparing values inside objects)
C# - string parsing
Fibonacci recursion
gfrsdfdfvgh
sdfgthyjuiujy7htgrf