PDA

View Full Version : tic tac toe



vinoth kumar
- 20th April 2007, 15:32
i want to make tic tac toe game using pic16f84a can anybody help me

skimask
- 20th April 2007, 16:03
i want to make tic tac toe game using pic16f84a can anybody help me

I sure we can...
How much experience do you have with the PICs?
How much experience do you have with PBP?
What code have you written so far?
How many projects have you built so far?
Can you make an LED blink?
Can you make an LED light up when pushing a button?

Pic_User
- 20th April 2007, 19:25
Hi vinoth kumar,

Welcome to the forum. :)

I would also add:
How much experience do you have with tic tac toe?

-Adam-

vinoth kumar
- 20th May 2007, 12:59
thank u all for ur response
i am working in picbasic pro for past 3 months
and i can make LEDsto blink
recently i had made a program to control two stepper motors for my
final year project for under graduation
i am using 16f84a and "no parts progmmer (through parallel port)"

skimask
- 21st May 2007, 00:35
recently i had made a program to control two stepper motors for my final year project for under graduation

......................:D

gandora
- 21st May 2007, 14:43
thank u all for ur response
i am working in picbasic pro for past 3 months
and i can make LEDsto blink
recently i had made a program to control two stepper motors for my
final year project for under graduation
i am using 16f84a and "no parts progmmer (through parallel port)"



Alright so the first question to ask yourself if you are ready for the project is, "what kind of screen or visualization method do you want to use?"

That is to say do you intend to use led's, lcd, or a pc interface, or some other thing I haven't thought of.

the next is "how my users play?" IE Buttons, keyboard, serial response.


getting a pic to do all the processing over the serial port before you build anything "real". May actually be the easiest way to start after that.

So figure out how your gonna have the pic store all those x's o's and nothings. You can probably use lookup tables.

Ok now you can store the info, but no matter how many you get in a row doesn't matter.

now make an engine that determines when someone has won.

yay! you have tic tac toe.

then, you can make the ai to make it beat you without having to lose to yourself. ^^

at any time in between these steps, or afterwards you can design the interface. But that most assuredly will not be the hard part.

vinoth kumar
- 27th May 2007, 08:30
Thank u gandora , for ur kind response,

Actually i want use 3*3 LED matrix for display (Bicolour LEDs if possible)

and some keys like those in the calculators .

With out interfacing with PC will be better

our game should have two options 1) one player mode (i.e, playing with pic)
2) two player mode
and peizo buzzer to announce the winner.

main aim is to keep things as simple as possible!!!

T.Jackson
- 27th May 2007, 09:05
How much experience do you have with tic tac toe?


That's a very good question that Adam has asked. You can't possibly expect to design an expert system unless you're an expert in what you're attempting to "mimic". I strongly suggest that you first proceed to master the game. Have someone play against you with pen & paper and when you can say that you can either win or draw every time, then you know it's time to start the project.

Best of luck with it!

gandora
- 28th May 2007, 02:00
Okay so you know the system you want now. So you can probably start making the interface. using a bigish solderles breed board make the display.

Choose the way you want the player to choose where to put the next x or o.

one way would be to have a button next to each led, and a led display to display weather it is player 1 or 2's turn.

other methods could be too complicated for a user, or would require implementing a cursor. This would probably involve up, down, left, right arrows, and a select button. You would have to be creative with the indication of what is selected. perhaps flash the led that is selected in different colors.


once you have built one of the two types of interfaces, you will then. dun dun dun. Have to get all the lights to light up, and all the buttons to accept your pic as there master. Not too hard but, you'll probably want a pic with alot of inputs and outputs. Or you can always dedicate pics to individual tasks. Take for instance making a single pic that runs the light show.

But for this project you should probably have plenty of ports.

Now once you have gone this far, make a simple program that let a user turn on an led of his choice.

now implement something that changes turns and the color of the led.

At this point you would have the ability to play tic tac toe, but the only ones who would care about the rules would be you and your enemy.

Once you have got this far. Then We can delve deeper into the awe that is tic tac toe.