Well, it is meant to be a two-player game.
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!
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
I'll second that.
Hhahahajust as good as paint huh?
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?
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
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 pieceeither 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.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!
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
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
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
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
Bookmarks