I assume his end goal is to draw those models like they were wireframed. instead of adding the overhead of generating a bunch of redundant vertices for his model in line mode, to instead just use built in api features for drawing models as wiremeshs.
if this is not his end goal, then disregard my comment.
Do logic in whatever size you feel like. Then draw it at whatever size you (or the user, depending on what you allow) feel like.
Scale input to your logic, instead of trying to scale your logic based on screen size.
If your logical window is 640 x 360, and the render resolution is at 1280 x 720, just treat input at coordinate 500 x 250 as if it were at 250x 125.
The exact process will depend a bit on what kind of stuff you're using -- some frameworks operate in normalized values from -1 to 1 across the entire screen, others might only give you access to the pixels and the window size. Regardless, you don't really care what size the window is, you care what size your world and logic is.
Or does anyone know if there is a way to track specific variables and act like a breakpoint when their value changes?
If you're using Visual Studio, you can set a breakpoint, and then set a Data Breakpoint (Debug --> New Breakpoint --> New Data Breakpoint...).
Set your address and it should notify you when the memory is written to.
That said, it sounds like maybe your not actually using the same camera as you're constructing.I would guess that your camera instance goes out of scope, and you're using a different (not correctly initialized) camera instance later on, or something like that...
Yes, but in that for loop, you have a piece of code that will essentially restart the current iteration of the for loop if the randomly chosen card has already been randomly chosen.
As you keep choosing unused cards, the chance of choosing an already chosen card will increase, which means constantly trying to select a new card, taking more and more time.
Other than the issue mentioned above, there's also an issue with how you randomly select a card. You currently choose a card between 1 and 52.
However, your arrays are only initialized to , so if card 52 is chosen (which will try to index into your arrays at ), you'll be comparing against uninitialized values, which might be what's causing your code to never finish.
Arrays are zero-indexed -- meaning that the first item in an array is at , not .
The fix for this issue is to simply remove the + 1 part of the random number generation.
Math.Rand() returns a number from 0 (0 is included) up to 1 (1 is not included).
Math.Floor(Math.Rand() * 52) -- this includeds the fix I mentioned -- yields a minimum of 0 and a maximum of 51. This is exactly what we want for indexing into our arrays.