Results 1 to 3 of 3

Thread: Four In A Row

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Four In A Row

    Does it always happen on the last column even if you remove or add a column?

    If I see this correctly your "state", i.e. which color is next, is in Player::color, correct?

    Add a private Player::setColor() method and then make sure no other part of the code writes "color" directly.
    Then put a log input into that and see if it is being called twice with the same color.

    If yes, then either there is a call for the other color missing or there is a wrong second call with the same color.

    Cheers,
    _

  2. #2
    Join Date
    Mar 2019
    Posts
    22
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    10
    Thanked 1 Time in 1 Post

    Default Re: Four In A Row

    anda_skoa i'm sorry for being an idiot and wasting your time.... I made a table for Four in a Row tab[5][11] but then i created another table tab2 which stores how many circles are in each collumn and i declared that table like this: tab2[10] instead of tab2[11] ... was one short....

    Thank you tho.

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
  •  
Qt is a trademark of The Qt Company.