Results 1 to 11 of 11

Thread: Legals when "randomly" selecting a winner.

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member DavesChillaxin's Avatar
    Join Date
    Mar 2011
    Location
    WNY
    Posts
    451

    Question Legals when "randomly" selecting a winner.

    So I found this question I was asked this evening interesting. I was told to, very quickly obviously, make a quick tool that generate a random integer. Easy right? But wait! I suppose there is a twist... This is going to be choosing a winner for a grand price. A grand price grand enough that I wish I could win, but for disclosure I can not say much more Lol. So, I was wondering if there are any legals involved when choosing a "random" winner. In all honesty I feel any computational piece of data a computer generates is never really random, so whats second best?

    The only way I know of doing such a task is purely basic at best.

    vbnet Code:
    1. Public Class Class1
    2. Private rnd As New System.Random(DateTime.Now.Millisecond)
    3.  
    4.     Public Function GenerateRandomInteger(ByVal Minimum As Integer, ByVal Maximum Integer) As Integer
    5.         Return rnd.Next(Minimum, Maximum)
    6.     End Function
    7.  
    8. End Class

    To get crazy, can we do unique ways of using random.next() to produce a more promising result?

    vbnet Code:
    1. Public Class Class1
    2. Private rnd As New System.Random(DateTime.Now.Millisecond)
    3.  
    4. Public Function GenerateRandomInteger(ByVal Minimum As Integer, ByVal Maximum Integer) As Integer
    5.     Dim col As New System.List(Of Integer)
    6.     Dim c As Integer = 0
    7.     Dim i As Integer = 0
    8.     Dim r As Integer = 0
    9.  
    10.     c = rnd.Next(0, 999)
    11.     i = rnd.Next(0, 999)
    12.     Do
    13.         col.Add(rnd.Next(Minimum, Maximum))
    14.     While (col.Count < c)
    15.     r = col(i)
    16.     Return r
    17. End Function
    18.  
    19. End Class

    Idk, this is a rather unusual topic for me to ask, but in business development. I find using random numbers nonexistent.



    PS I'm not going to use Random.Org
    Last edited by DavesChillaxin; May 20th, 2013 at 09:42 PM.
    Please rate if my post was helpful!
    Per favore e grazie!




    Code Bank:
    Advanced Algebra Class *Update | True Gradient Label Control *Dev | A Smarter TextBox *Update | Register Global HotKey *Update
    Media Library Beta *Dev | Mouse Tracker (Available in VB.net and C#.net) *New | On-Screen Numpad (VB.net) *New

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width