Advertisement
KeeJayBe

Spel_v1

May 8th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public class Spel
  2. {
  3. SpelBord sb = new SpelBord();
  4. Combinaties cb = new Combinaties();
  5.  
  6. public Spel()
  7. {
  8. launchGame();
  9. }
  10.  
  11. public void launchGame(){
  12. sb.initBoard();
  13. sb.printBoard();
  14. cb.randomComb();
  15. while(cb.correctCheck()!=true){
  16. gamePlay();
  17. }
  18. if(cb.correctCheck()==true){
  19. System.out.println("Gewonnen!");
  20. }else {
  21. System.out.println("Verloren, probeer opnieuw");
  22. }
  23. }
  24.  
  25. public void gamePlay(){
  26. cb.setCurrentCode();
  27. cb.combinationChecker();
  28. sb.printBoard();
  29. cb.newRound();
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement