n00berS Posted September 7, 2007 Share Posted September 7, 2007 i need to code a program that plays tic-tac-toe? im new to java and is there any way that i can do this fast and easy Quote Link to comment Share on other sites More sharing options...
cooper Posted September 7, 2007 Share Posted September 7, 2007 So which is it, Java or Javascript? The fast and easy way is to google for someone else's code. Quote Link to comment Share on other sites More sharing options...
brainfreeze Posted September 7, 2007 Share Posted September 7, 2007 Java and Javascript are completely different languages. Contray to popular belife, they have nothing to do with each other, other than a similar name. Nothing. Although sun now own both. Javascript is not a scripting version of Java like one would expect due to the name. Its not like VB and VBscript. They are different languages in their own right. This is the code for tic tac toe in java: http://rintintin.colorado.edu/~epperson/Java/TicTacToe.java Its using awt for the GUI And here it is in java script: http://javascript.internet.com/games/tic-tac-toe.html Quote Link to comment Share on other sites More sharing options...
jollyrancher82 Posted September 7, 2007 Share Posted September 7, 2007 Java and Javascript are completely different languages. Contray to popular belife, they have nothing to do with each other, other than a similar name. Nothing. Although sun now own both. Javascript is not a scripting version of Java like one would expect due to the name. Its not like VB and VBscript. They are different languages in their own right. This is the code for tic tac toe in java: http://rintintin.colorado.edu/~epperson/Java/TicTacToe.java Its using awt for the GUI And here it is in java script: http://javascript.internet.com/games/tic-tac-toe.html In the JavaScript one you always win if you go first, and tie if the computer goes first. Pretty poor AI :/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.