Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: [GAME] Dots and Boxes

  1. #11
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Well, it is meant to be a two-player game.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #12
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,374
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    I'll let you click my mouse if you . . .

    Seriously though, I think that would be more practical with pencil and paper.

    Or - it could be played over a live connection. In fact, I'm fairly sure there is a way to do that already, but not with javascript.

    I wonder though, how hard would it be to create the routines to make the browser compete with the user? if {} else if {} else {}. I mean - either there is a way to complete a box, or a way to not let the opponent complete one, or not a way to not let the opponent complete one. Just three basic states whenever the browser gets control. That is, unless I missed something about this game. Do you get a free turn if you complete a box?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #13
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by Nile View Post
    Make the hover a darker grey.
    I'll second that.
    Quote Originally Posted by jlizarraga View Post
    Hhahaha just as good as paint huh?
    Quote Originally Posted by jscheuer1 View Post
    Just from the perspective of playing the game, I found it boring. Perhaps if you could get the computer to play one of the colors . . .

    Anyways, reminds me of battleship, which can be fun as long as you don't have to play both 'hands'.
    I don't think it's boring since it is a two player game, but it would be nice to have the option to play against a CPU. I assume that would require a lot more coding so, maybe a future project?
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  4. #14
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by jscheuer1 View Post
    Do you get a free turn if you complete a box?
    Yup..
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  5. #15
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,374
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Snookerman View Post
    Quote Originally Posted by jscheuer1 View Post
    Do you get a free turn if you complete a box?
    Yup..
    That would definitely make the logic on the browser's side more complex.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #16
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    either there is a way to complete a box, or a way to not let the opponent complete one, or not a way to not let the opponent complete one.
    That's kind of like saying that it's easy to make a chess bot — either you can take a piece, you can stop your opponent taking a piece, or you can't stop your opponent taking a piece Such a bot would be easily beaten by repeated application of, say, the double-cross.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #17
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The game is a lot more complex than you might think it is from first look, John.

    The strategy is to draw a line while not completing the third side to any given square, in order that the opponent cannot then complete said square. More than that, it becomes a battle of wits to get the opponent to complete that third side somewhere and also to make it most valuable when it does occur. Best played, the game will result in a series of traps where a single move will open an entire path of now available boxes to be closed, and this is what makes the game complex. Coding an opponent would be cool, but it would take a lot of work to make it a strong player.

    Making some sort of live one-on-one game system would be fun, but that's sorta beyond this discussion-- something I've pondered a little for a while now, with any sort of simple game. It wouldn't be particularly hard, except storing each game. It would end up having the same basic components as a chat script.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #18
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,374
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by jscheuer1 View Post
    That would definitely make the logic on the browser's side more complex.
    Quote Originally Posted by Twey View Post
    That's kind of like saying that it's easy to make a chess bot — either you can take a piece, you can stop your opponent taking a piece, or you can't stop your opponent taking a piece Such a bot would be easily beaten by repeated application of, say, the double-cross.
    Quote Originally Posted by djr33 View Post
    The game is a lot more complex than you might think it is from first look, John.
    Yes, I got that. And I thought I adequately expressed having gotten that with my (above quoted) post. Apparently not. But once I knew that you get a free turn for completing a box, I saw the complexity involved. It's one thing to get a box, quite another to be forced to move again if you do.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #19
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That's just a loop, really. I don't think it's any more difficult to program the computer to play the game than it was to set up the play in the first place (after all, the same rules would apply, no?). But to make it play well, that is where things get tricky.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #20
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Ok, I have an idea but it's very insane. You can hook that up from ajax to a database to another computer with ajax and you can have a little waiting room.
    In waiting room:
    Sookerman [Challenge? Sookerman has beat 1 out of 3 games hes played]
    djr3 [Challenge? djr3 has beat 3 out of 5 games hes played]
    Nile [You have beat 1 out of 5 games you've played]

    And then its from there, but thats a little harder.
    Jeremy | jfein.net

Tags for this Thread

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
  •