my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Need help with this Random OO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Need help with this Random OO

Andres John
Ranch Hand

Joined: Jun 07, 2012
Posts: 34

already modify the code as the prof ask but still can't solves this k tour problem for an 8 by 8 board by randomly picking a move from 0 to 7 and try to do this 100 time if the move is not legal after 100 it will abort the games and if i make 64 moves then i could print the board
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Is this different than your other thread?

http://www.coderanch.com/t/594785/java/java/make-java-code-Random-OO
Andres John
Ranch Hand

Joined: Jun 07, 2012
Posts: 34
Jeff Verdegan wrote:Is this different than your other thread?

http://www.coderanch.com/t/594785/java/java/make-java-code-Random-OO
yes it is i just modify the start method to use random number
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
Not convinced that is enough to warrant a new thread.
Please continue all discussion here.
 
 
subject: Need help with this Random OO
 
Similar Threads
Battleships - guys please help me out!
Using GridLayout as GUI
how to make this java code Random using OO?
Loops
array out of bounds