Hi Stevan Still strugling with the Bingo" software?
Did my peace of code didn't solve the problem?

How about something like
For i:= 0 to 5 Do
Begin
  For i1 :0  to 14 do
    Count Number of empty cells
  While EmptyCell < 4 Pick number in random cell and add to a list of
NumberToMove, and empty tha cell
End;

For i:= 0 to 5 Do
Begin
  For i1 :0  to 14 do
    Count Number of empty cells
  While EmptyCells > 4 Pick a random empty cell and pick a random number to
put in it.
End

But if you still need to spread out the numbers and "holes" this will no be
enough.

/Kaj
  -----Original Message-----
  From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Prof. Stevan Djuranovic
  Sent: 13. juni 2005 22:20
  To: [email protected]
  Subject: [delphi-en] StringGrid - empty cells


  Hi,

  I have StringGrid1 with 6 rows and 15 columns.

  I need to count how many empty cells there are in each row.

  There are exactly 24 empty cells randomly allocated in these 6 rows.

  Other cells contains numbers.

  How to calculate which row has empty cells and how many empty cells it
has,
  and how to take number(s) from row which has less empty cells and put
  that number in another row to fulfil this:

  --- 6 rows with four empty cells in each row ---

  Thanks.


  ---------------------------------
  Discover Yahoo!
  Get on-the-go sports scores, stock quotes, news & more. Check it out!

  [Non-text portions of this message have been removed]



  -----------------------------------------------------
  Home page: http://groups.yahoo.com/group/delphi-en/
  To unsubscribe: [EMAIL PROTECTED]



----------------------------------------------------------------------------
--
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

    b.. To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to