Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function tourIA(){
- var position = new List<Int>();
- for(i in 0...(Std.parseInt(Math.pow(dimensions,2)))position.add(i);
- var pos = Std.random(length(position);
- var cellule = position[pos];
- var x = cellule%dimensions;
- var y = Math.floor(cellule);
- var n : Navire = mer.chercherNavire(x , y);
- if (n != null) {
- mer.montrerNavire(n);
- }
- else{
- mer.placerCroix(mer, position, dimension);
- }
- }
Add Comment
Please, Sign In to add comment