![]() |
| ||
| Tic Tac Toe help hi guys.. i need help.. can you give me a simple program of games in java except for tic-tac toe? i need it at the end of july.. i want to pass this subject and i want to master this programming language... please do grant my request... thank you very much |
| ||
| Re: please help me..... Do your own homework. You have a month, do it. God, asking for someone to do your work for you, then saying, in the same breath no less, that you want to master the language. Well, buddy, those two statements just do not go together. |
| ||
| Re: please help me..... Quote:
|
| ||
| Re: please help me..... since you are taking the subject, you'll propably have examples in your textbook or a course. try to understand what they do, create alternative sollutions, ... this is a better (and faster) way to learn java than asking someone you don't know and who'll propably use code you don't understand to make it for you. just choose for yourself what kind of program you want, decide on the classes, make them and use them. even if the program isn't completed at the end of the month, at least your teacher will see you've given it some effort. |
| ||
| Re: please help me..... How about a simple card game like blackjack! Make a class called card and initialize each one putting them into a container like a list. You could then implement an algorithm to shuffle the cards too. |
| ||
| Re: Tic Tac Toe help I wrote a tic-tac-toe program in about an hour for AP Computer Science. In a week we wrote a fully functional monopoly. (just to give you an idea of what a month can do) Suggestion for implementation of a tic-tac-toe program: Make a grid of buttons with transparent .gifs via loop(using gridbag or something to make the 3x3 grid) and place them into a two dimensional array (or populate a two dimensional array with a small class representing the buttons). The buttonclick method could then replace the button being clicked with either an x or an o .gif, then call a method to check for 3 of the same .gifs (or flag variables in the classes) in a row in the various directions. Once one of the players wins, display a win message and disable the buttons. The one that I wrote was 3 classes and totaled only 340 lines including the gui. A tic-tac-toe program shouldn't take you very long at all to write, so knock it out early and enjoy your month :p |
| ||
| Re: Tic Tac Toe help Whoops, missed the part with "except" on the tic tac toe idea. :p Connect 4 is an easy game that can be done with an expanded version of the "Suggestion for implementation of a tic-tac-toe program:" above with the addition of a timer and using only a single row of actual buttons. Monopoly is an easy game to write if you keep it basic, though requires lots of gui code, which can take time to work through if you get something wrong. If you don't like guis and prefer algorithms, you can try Tetris (friend of mine wrote one in about a week and a half) or simple card games as stated above. |
| ||
| Re: Tic Tac Toe help I think he already left once he found out we wouldn't just hand him a completed assignment to turn in. |
| ||
| Re: Tic Tac Toe help Quote:
He still has 26 days before he realizes no-one else will give him a completed assignment either. :p I think the connect 4 idea was good anyways. I hope he comes back and tries it. |
| ||
| Re: Tic Tac Toe help Quote:
|
| All times are GMT -4. The time now is 7:05 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC