(String scr)
| 149 | } |
| 150 | |
| 151 | public static int[] image(String scr) { |
| 152 | initColor(); |
| 153 | String[] s = scr.split(" "); |
| 154 | for (int i = 0; i < s.length; i++) |
| 155 | if (s[i].length() > 0) { |
| 156 | int mov = "UDLRFB".indexOf(s[i].charAt(0)); |
| 157 | move(mov); |
| 158 | if (s[i].length() > 1 && mov < 2) { |
| 159 | move(mov); |
| 160 | if (s[i].charAt(1) == '\'') move(mov); |
| 161 | } |
| 162 | } |
| 163 | return img; |
| 164 | } |
| 165 | } |
no test coverage detected