+ Reply to Thread
Results 1 to 3 of 3

Slot machine clustered wins

  1. #1
    Registered User
    Join Date
    01-05-2018
    Location
    Hillerød, Denmark
    MS-Off Ver
    2016
    Posts
    2

    Slot machine clustered wins

    New to this forum, so hoping for some fairly advanced help.

    I'm building a slotmachine with a total of 30 individual reels. I've built several less advanced slot machines, but this one is a little more advanced.

    Imagine 6 columns with 5 symbols on each making a grid of 30 squares. Player will win if 8 or more of the same symbols are connected (vertically or horizontally - not diagonally). Example:

    223453
    213533
    113373
    133331
    333311

    See how there are 12 symbol 3's that are connected (but also 4 symbol 3's that aren't)?

    How would I go about creating a fairly quick routine that can tell me that 12x symbol 3's are connected on this particular spin.

    Forever grateful for any help you guys and gals can offer.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Slot machine clustered wins

    The attached workbook has an array-entered UDF, entered into a 5 row by 6 column set of cells, which takes the slot machine results and the number required (in this case 8) and returns an indication of the winning connections, if there is one. I think it will work for any orientation of values, but have not fully tested it..... It will also only find one winning combination, even if there is a second or third (which is possible but unlikely).

    It is written so that you can change the size or orientation of the array of reels, and the number that need to connect to win.

    Let me know if you have trouble adapting it to your application.
    Attached Files Attached Files
    Last edited by Bernie Deitrick; 01-05-2018 at 05:42 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    01-05-2018
    Location
    Hillerød, Denmark
    MS-Off Ver
    2016
    Posts
    2

    Re: Slot machine clustered wins

    Bernie, this is absolutely fantastic! Thank you so much

    I might have follow-up questions, but looking very much forward to delving into this and making it work!

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. excel macro running on machine, but not on other machine. Language setting?
    By rickmeister in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2017, 09:09 AM
  2. Replies: 3
    Last Post: 09-05-2016, 08:34 PM
  3. Slot machine
    By gokzee in forum Excel General
    Replies: 2
    Last Post: 05-14-2013, 05:46 AM
  4. Replies: 1
    Last Post: 06-04-2012, 08:34 AM
  5. Working code on my machine is returning out of range error on another machine.
    By je.suis.ketan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2012, 11:51 PM
  6. Replies: 2
    Last Post: 03-01-2006, 12:25 AM
  7. Replies: 6
    Last Post: 02-28-2006, 01:20 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1