Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. Set<Move> validMoves = new HashSet<>();
  2. Set<Move> firstDoubleMove = new HashSet<>();
  3. if (colour == Black) {
  4. firstDoubleMove.addAll(moveGenerator(Black, players.get(0).location()));
  5. if(players.get(0).hasTickets(Ticket.Double) && currentRound != 22) {
  6. for(Move firstMove : firstDoubleMove) {
  7. Set<Move> secondDoubleMove = new HashSet<>();
  8. secondDoubleMove.addAll(moveGenerator(Black, ));
  9. for(Move secondMove : secondDoubleMove) {
  10. new DoubleMove(Black, )
  11. validMoves.add(new DoubleMove(Black))
  12. }
  13. }
  14. }
  15. } else {
  16. validMoves.addAll(moveGenerator(colour, players.get(colours.indexOf(colour)).location()));
  17. if (validMoves.isEmpty()) {
  18. validMoves.add(new PassMove(colour));
  19. }
  20. }
  21. return validMoves;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement