Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Matcher positionMatcher = DraughtsPatterns.draughtPosition.matcher(line);
- if (line.contains("-")) {
- String from = null, to = null;
- if (positionMatcher.find())
- from = positionMatcher.group(0);
- if (positionMatcher.find())
- to = positionMatcher.group();
- makeMove(from, to);
- } else {
- if (positionMatcher.find()) {
- String from = positionMatcher.group();
- while (positionMatcher.find()) {
- String to = positionMatcher.group();
- makeCapture(from, to);
- from = to;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement