A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Simple "Connect Four" Game for two

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Location
    Kellinghusen, Germany
    Posts
    14

    Simple "Connect Four" Game for two

    Hi, I am trying to make a real simple "Connect four" Game without any KI, just for two people taking turns to klick.
    Sounds easy, but I just can't get it right. I found a .fla in the internet and tried to modify it, but there's some mistake in the script that I just can't figure out.

    The problem with the script that I have is that the game doesn't "take turns". It's stuck with the first player. After the first player makes his move the game is supposed to switch to player number two, which it doesn't.
    Does anybody have an idea what the script is missing in order to take turns between the two players and stop then when one of them has built a row of four?

    I attached the two files that I have... The downloaded one that I googled and the one I already modified a little bit. The one that I downloaded uses a PHP file to make it available for online playing. I just want it for playing offline though.

    How can I get the game to "take turns", to switch between the two players?
    Any help is greatly appreciated... Thanks!!!
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Oct 2008
    Posts
    120
    I suggest you write your own code, and if you can't (especially what you're asking), then you should be doing tutorials. I don't think anyone here is going to debug and code on some scripts you found...

    EDIT: Plus, that code is in German or something and it's hard to understand.
    Last edited by DeadRiver; 03-12-2009 at 10:20 AM.

  3. #3
    Junior Member
    Join Date
    Mar 2001
    Location
    Kellinghusen, Germany
    Posts
    14
    If there would be any tutorial on that topic, I would surely do it... thanks anyway.

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518

    Maybe you can adapt this...

    See attached file...
    Last edited by dawsonk; 06-10-2009 at 10:17 AM.

  5. #5
    Junior Member
    Join Date
    Mar 2001
    Location
    Kellinghusen, Germany
    Posts
    14
    Oh my goodness, you are the greatest!!! This is so good... and I can understand the code much better than the other one - yours seems to be much more logic. THANK YOU THANK YOU!!!

  6. #6
    Senior Member
    Join Date
    Oct 2008
    Posts
    120
    I meant you should do some general tutorials for knowledge.
    Doesn't matter...seems someone did help. I still suggest you to re-write whatever dawsonk wrote.

    EDIT: lawl at the hearts =P.
    Last edited by DeadRiver; 03-13-2009 at 10:34 AM.

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

HTML5 Development Center