Blog Post
byrontik
Community Member
Very nice, comprehensive and very tidy, thanks for sharing
For those users who would like to challenge themselves even more:
1. You could also allow the user to drag and drop their ships into position by reading a variable of the square.
2. you could use a javascript to randomise the computers turn, so you get 'tit-for-tat' turns and random chance.
var player=GetPlayer();
player.SetVar("randomVariable", Math.floor((Math.random()*10)+1));
you would need to create conditions around which numbers have already been played and introduce 'proximity shot intelligence' based on successful hits. Fun stuff:)
Very cool.
For those users who would like to challenge themselves even more:
1. You could also allow the user to drag and drop their ships into position by reading a variable of the square.
2. you could use a javascript to randomise the computers turn, so you get 'tit-for-tat' turns and random chance.
var player=GetPlayer();
player.SetVar("randomVariable", Math.floor((Math.random()*10)+1));
you would need to create conditions around which numbers have already been played and introduce 'proximity shot intelligence' based on successful hits. Fun stuff:)
Very cool.
AllisonLaMotte
9 years agoStaff
Thanks Byron! I would love to see a version with these two features added in. :)