views:

57

answers:

1

I am doing a internet cafe sweepstakes slot game in vb.net. I want to show the objects based on the payout and the prize money for paylines in the slot game. I tried using MT algorithem but it basically random number based. the final output should not be radom.

Inputs

  1. Points Ex. 18 or 50 (2 entries) 9 or 25 (1 Entry)
  2. prize (from database) Ex. 200 cents
  3. Total Lines Ex. 9 or 25
  4. 1 Line = Points/Lines (18/9) = 2 Points
  5. Reels = 5
  6. Rows = 3
  7. Pay Table\Pay out = 10 Arrays Ex. obj1(0) = 0, obj1(1) = 20,obj1(2) = 100,obj1(3) = 300,obj1(4) = 2000,
  8. Line array Example: L1 (2,1)(2,2),(2,3),(2,4),(2,5) = 2 Points = 15 cents L2 (1,1 )(1,2),(1,3),(1,4),(1,5) = 2 Points = 300 cents L3 (3,1)(3,2),(3,3),(3,4),(3,5) = 2 Points = 30 cents L4 (1,1)(2,2),(3,3),(2,4),(1,5) = 2 Points = 200 cents L5 (3,1)(2,2),(1,3),(2,4),(3,5) = 2 Points = 0 cents L6 (2,1)(3,2),(3,3),(3,4),(2,5) = 2 Points = 20 cents L7 (2,1)(1,2),(1,3),(1,4),(2,5) = 2 Points = 6 cents L8 (1,1)(2,2),(2,3),(2,4),(1,5) = 2 Points = 0 cents L9 (3,1)(2,2),(2,3),(2,4),(3,5) = 2 Points = 10 cents

Output

3 X 5 Matrix

A: 

With any random number generator you have to seed its input. For random number on windows platform your best off just using CryptGenRandom(). Keep in mind that time() alone is a very bad seed because often times the attacker knows the time.

  <DllImport("coredll.dll")> _
  Public Shared Function CryptGenRandom( _
     ByVal hProv As IntPtr, ByVal dwLen As Integer, _
     ByVal pbBuffer() As Byte) As Boolean
  End Function
Rook