Guest User

Untitled

a guest
Jan 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public void findSolutions(int count)
  2. {
  3. for(int i = 0; i < board.length; i++)
  4. {
  5. if(board[i] == 0)
  6. {
  7. for(i = 0; i < holes.length; i++)
  8. {
  9. temp = board[i];
  10. Move(temp);
  11. }
  12. }
  13. }
  14. if(count == finale)
  15. {
  16. System.out.println("Retry? 'yes' or 'no' ");
  17. if(scan.nextLine().equals("yes"))
  18. {
  19. findSolutions(count);
  20. }
  21. else
  22. {
  23. scan.nextLine().equals("no");
  24. }
  25. }
  26. }
  27.  
  28.  
  29. public String Move(int p){
  30.  
  31. int point = p;
  32.  
  33.  
  34. if (point == 0){
  35. if (board[3] == 1 && board[1] == 1) {
  36. board[3] = 0; board[1] = 0; board[0]=1;
  37. count--;
  38.  
  39. saveMove = "(3,1,0)";
  40.  
  41. }
Add Comment
Please, Sign In to add comment