Stumbling in F#; Fixing it WithC#
For some crazy reason, mental blind spot probably, I've been really struggling to figure out how to work with a two-column array in F#. So, I picked up my C# book and their example made it very clear how to accomplish this. The fact I was able to understand and use the C# technique makes me feel a little better, but I suppose the F# technique is probably insanely easy and I'm just overlooking it somehow.
I also don't think this code is particularly elegant; it is long and there is a low probability that there will be duplicate random numbers created, which in this program causes the bottom of the stack to be incorrectly called. I know how to overcome this problem though, and I'd probably do something about it if I decided to put this into a game.
Anyway, without further ado, here's my C# random bingo number stack creator. You can start a new C# console application in Visual Studio 2005 and just replace the contents of Program.cs with the following
UPDATE: That code just plain didn't paste correctly. It wasn't that amazing anyway. Comment me if you want a copy and I'll get it to you.
0 Comments:
Post a Comment
<< Home