Check this code
http://pastebin.com/m1503a55f
How do I make it human vs computer instead of human vs human?
I tried many possibilities, I cant get anywhere, any guidance?
Check this code
http://pastebin.com/m1503a55f
How do I make it human vs computer instead of human vs human?
I tried many possibilities, I cant get anywhere, any guidance?
anyone have ideas
Sure, but you're gonna have to pay for it.![]()
using the random function aka $variable = rand(min,max); in a few places should get your artificial intelligence in no time
if you are looking for a random challenge, keep it simple and have one random variable from 1-9 indicating where on the board the marker shall be placed
if you are looking for say, 2 or 3 skills levels, use many if statements and random numbers to determine whether the ai should make the right move
for instance:
//computers turn
$random=rand(1,9);
if($random=1){
$postmarker;
}elseif($random=2){
$postmarker;
}
ect...
to add difficulty you will need to place checks to see where your markers are on the board to determine whether the computer should place there or not
good luck
http://www.insanecombat.com << bored? check out ma game
Bookmarks