fork(1) download
  1. #!/usr/bin/python
  2.  
  3. import pygame
  4. import serial
  5. import time
  6. import re
  7. import Queue
  8. import logging
  9. from logging.handlers import WatchedFileHandler
  10. import threading
  11. import sys
  12. import signal
  13. import subprocess
  14. import os
  15. import websocket
  16. from websocket import create_connection
  17.  
  18. FPS = 30
  19. DRAW_WINDOW_SIZE = (1280, 1024)
  20. pressed_queue = Queue.Queue(maxsize=20)
  21. send_queue = Queue.Queue()
  22. SERIAL_DEV = '/dev/ttyACM0'
  23. stop_read = threading.Event()
  24. begin_draw = threading.Event()
  25. help_pressed = threading.Event()
  26. conn_ok = threading.Event()
  27. ok_get = threading.Event()
  28. stop_read.clear()
  29. begin_draw.clear()
  30. help_pressed.clear()
  31. conn_ok.clear()
  32. ok_get.clear()
  33.  
  34. threads = []
  35.  
  36. LOG_FORMAT = '[%(asctime)s] %(levelname)s: %(funcName)s: %(message)s'
  37. log = logging.getLogger('main_log')
  38. log.setLevel(logging.DEBUG)
  39. log_handler = WatchedFileHandler('screen.log')
  40. log_fmt = logging.Formatter(fmt=LOG_FORMAT)
  41. log_handler.setFormatter(log_fmt)
  42. log.addHandler(log_handler)
  43.  
  44. # workaround for wrong buttons numbering
  45. btn_table = {
  46. '0': '9',
  47. '1': '8',
  48. '2': '7',
  49. '3': '6',
  50. '4': '5',
  51. '5': '4',
  52. '6': '3',
  53. '7': '2',
  54. '8': '1',
  55. '9': '0'
  56. }
  57.  
  58. choose_imgs = {
  59. '0': 'imgs/sim 0.png', # 0
  60. '1': 'imgs/sim 1.png', # 1
  61. '2': 'imgs/sim 2.png', # 2
  62. '3': 'imgs/sim 3.png', # 3
  63. '4': 'imgs/sim 4.png', # 4
  64. '5': 'imgs/sim 5.png', # 5
  65. '6': 'imgs/sim 6.png', # 6
  66. '7': 'imgs/sim 7.png', # 7
  67. '8': 'imgs/sim 8.png', # 8
  68. '9': 'imgs/sim 9.png' # 9
  69. }
  70.  
  71. choose_imgs_surf = {}
  72.  
  73. answer_img = {
  74. (1, 1, 0): 'imgs/110-mercury2.jpg',
  75. (1, 2, 0): 'imgs/120-venera2.jpg',
  76. (1, 2, 3): 'imgs/123-1-hz2.jpg',
  77. (1, 3, 1): 'imgs/131-earth2.jpg',
  78. (1, 4, 2): 'imgs/142-mars2.jpg',
  79. (1, 5, 1): 'imgs/151-jupiter2.jpg',
  80. (1, 6, 0): 'imgs/160-saturn2.jpg',
  81. (1, 7, 2): 'imgs/172-uran2.jpg',
  82. (1, 8, 6): 'imgs/186-neptun2.jpg',
  83. (1, 9, 1): 'imgs/191-pluton2.jpg',
  84. (2, 3, 4): 'imgs/234-2-hz2.jpg',
  85. (2, 4, 2): 'imgs/242-3-hz2.jpg',
  86. (3, 3, 1): 'imgs/331-4-hz2.jpg',
  87. (3, 4, 1): 'imgs/341-5-hz2.jpg',
  88. (3, 4, 4): 'imgs/344-6-hz2.jpg',
  89. (3, 4, 5): 'imgs/345-7-hz2.jpg',
  90. (3, 5, 3): 'imgs/353-8-hz2.jpg',
  91. (4, 5, 6): 'imgs/456-9-hz2.jpg',
  92. (4, 6, 2): 'imgs/462-10-hz2.jpg',
  93. (5, 6, 7): 'imgs/567-11-hz2.jpg',
  94. (5, 7, 5): 'imgs/575-12-hz2.jpg',
  95. (6, 7, 8): 'imgs/678-13-hz2.jpg',
  96. (6, 8, 6): 'imgs/686-14-hz2.jpg',
  97. (7, 7, 5): 'imgs/775-15-hz2.jpg',
  98. (7, 8, 5): 'imgs/785-16-hz2.jpg',
  99. (7, 8, 8): 'imgs/788-17-hz2.jpg',
  100. (7, 8, 9): 'imgs/789-18-hz2.jpg',
  101. (7, 9, 7): 'imgs/797-19-hz2.jpg',
  102. (8, 8, 6): 'imgs/886-22-hz2.jpg',
  103. (8, 9, 0): 'imgs/890-20-hz2.jpg',
  104. (8, 9, 6): 'imgs/896-23-hz2.jpg',
  105. (8, 9, 9): 'imgs/899-21-hz2.jpg',
  106. (9, 1, 9): 'imgs/919-24-hz2.jpg'
  107. }
  108.  
  109. not_found = False
  110.  
  111.  
  112. class AskEntry(object):
  113. def __init__(self, xval, yval, padding, img_path):
  114. super(AskEntry, self).__init__()
  115. self.coord = (xval, yval)
  116. self.padding = padding
  117. self.img = pygame.image.load(img_path).convert_alpha()
  118. self.cent_img = pygame.image.load('imgs/sim D.png').convert_alpha()
  119. self.x_size, _ = DRAW_WINDOW_SIZE
  120. self.y_size = 200
  121. self.surf = pygame.Surface(
  122. (self.x_size, self.y_size),
  123. flags=pygame.SRCALPHA,
  124. depth=32
  125. )
  126. self.surf.blit(self.img, (self.padding, 0))
  127. self.surf.blit(
  128. self.cent_img,
  129. (self.x_size / 2 - 70, self.y_size / 2 - 70)
  130. )
  131. self.answer = None
  132.  
  133. def draw_choosed(self, choose):
  134. self.answer = choose
  135. self.img_ok = choose_imgs_surf[choose]
  136. self.append_answer()
  137.  
  138. def reset_answer(self):
  139. self.answer = None
  140.  
  141. def append_answer(self):
  142. self.surf.blit(
  143. self.img_ok,
  144. (self.x_size - self.padding - 200, 0)
  145. )
  146.  
  147. def redraw(self):
  148. self.surf.fill((0, 0, 0, 0))
  149. self.surf.blit(self.img, (self.padding, 0))
  150. self.surf.blit(
  151. self.cent_img,
  152. (self.x_size / 2 - 70, self.y_size / 2 - 70)
  153. )
  154.  
  155. def full_reset(self):
  156. self.reset_answer()
  157. self.redraw()
  158.  
  159.  
  160. class AskLayer(object):
  161. def __init__(self, size):
  162. super(AskLayer, self).__init__()
  163. self.size = size
  164. self.surf = pygame.Surface(size, flags=pygame.SRCALPHA, depth=32)
  165.  
  166. def draw(self, ask_entry):
  167. self.surf.blit(
  168. ask_entry.surf,
  169. ask_entry.coord
  170. )
  171.  
  172. def reset(self):
  173. self.surf.fill((0, 0, 0, 0))
  174.  
  175.  
  176. def answer_img_load(answers_list):
  177. global not_found
  178. if tuple(answers_list) in answer_img:
  179. img_for_show = pygame.image.load(
  180. answer_img[tuple(answers_list)]
  181. ).convert_alpha()
  182. elif (answers_list[0] == 0) or (answers_list[1] == 0):
  183. img_for_show = pygame.image.load(
  184. 'imgs/00-DeathStar2.jpg'
  185. ).convert_alpha()
  186. else:
  187. img_for_show = pygame.image.load(
  188. 'imgs/allother-asteroids2.jpg'
  189. ).convert_alpha()
  190. not_found = True
  191.  
  192. return img_for_show
  193.  
  194.  
  195. def preload_choose_imgs():
  196. for key, path in choose_imgs.iteritems():
  197. choose_imgs_surf[key] = pygame.image.load(path).convert_alpha()
  198.  
  199.  
  200. def main():
  201. global not_found
  202. signal.signal(signal.SIGINT, ctrl_c_handler)
  203. pygame.init()
  204. clock = pygame.time.Clock()
  205. screen = pygame.display.set_mode(
  206. DRAW_WINDOW_SIZE,
  207. pygame.NOFRAME
  208. )
  209. pygame.mouse.set_visible(False)
  210. ask_layer = AskLayer(DRAW_WINDOW_SIZE)
  211. barrel_test = pygame.image.load('imgs/barrel view.png').convert_alpha()
  212. lines = pygame.image.load('imgs/Navig sreen.png').convert_alpha()
  213. fin_img = pygame.image.load('fin.png').convert_alpha()
  214. not_found_img = pygame.image.load('imgs/not_found2.jpg').convert_alpha()
  215. preload_choose_imgs()
  216. quest_list = []
  217. quest_list.append(AskEntry(0, 127, 300, 'Ps1-sun.png'))
  218. quest_list.append(AskEntry(0, 412, 230, 'Ps2-place.png'))
  219. quest_list.append(AskEntry(0, 693, 300, 'Ps3-sputnik.png'))
  220.  
  221. ser_t = threading.Thread(
  222. target=mon_serial,
  223. args=(SERIAL_DEV,)
  224. )
  225. ser_t.daemon = True
  226. ser_t.start()
  227. threads.append(ser_t)
  228.  
  229. conn_ok.wait(timeout=5)
  230. if not conn_ok.isSet():
  231. safe_quit()
  232. send_queue.put('OK\n')
  233. ok_get.wait(timeout=1)
  234. if not ok_get.isSet():
  235. safe_quit()
  236. else:
  237. ok_get.clear()
  238.  
  239. first_run = True
  240. running = True
  241. playing = True
  242. ask = False
  243. ask_update = True
  244. quest_numb = 0
  245. draw_answer = False
  246. send_resume = False
  247. repeat_cnt = 0
  248. screen_update = True
  249. show_answered = False
  250.  
  251. begin_draw.wait()
  252. screen.fill((255, 255, 255))
  253. screen.blit(barrel_test, (0, 0))
  254. pygame.display.update()
  255. screen.blit(lines, (0, 0))
  256.  
  257. while running:
  258. begin_draw.wait()
  259. for event in pygame.event.get():
  260. if event.type == pygame.QUIT:
  261. safe_quit()
  262.  
  263. if help_pressed.isSet():
  264. playing = True
  265.  
  266. if playing:
  267. log.debug('Start omxplayer')
  268. subprocess.call([
  269. 'omxplayer',
  270. '--no-keys',
  271. '--layer', '2',
  272. 'video.avi'
  273. ])
  274. log.debug('Video played')
  275. playing = False
  276. send_resume = True
  277. help_pressed.clear()
  278. continue
  279.  
  280. if send_resume:
  281. if first_run:
  282. ask = True
  283. first_run = False
  284. if not ok_get.isSet():
  285. if repeat_cnt > 10:
  286. safe_quit()
  287. send_queue.put('RESUME')
  288. time.sleep(0.2)
  289. repeat_cnt += 1
  290. else:
  291. ok_get.clear()
  292. help_pressed.clear()
  293. send_resume = False
  294. log.debug('Resuming after video played')
  295. repeat_cnt = 0
  296. continue
  297.  
  298. if ask:
  299. try:
  300. btn = pressed_queue.get(True, 0.1)
  301. log.debug('Get from queue' + str(btn))
  302. except Queue.Empty:
  303. pass
  304. else:
  305. log.debug('Pressed BUTTON ' + btn)
  306. quest_list[quest_numb].draw_choosed(
  307. btn_table[btn.lstrip('B')]
  308. )
  309. ask_layer.draw(quest_list[quest_numb])
  310. quest_numb += 1
  311. ask_update = True
  312.  
  313. if quest_numb == 3:
  314. ask = False
  315. ask_update = False
  316. draw_answer = True
  317. show_answered = True
  318. screen.blit(ask_layer.surf, (0, 0))
  319. pygame.display.update()
  320.  
  321. if ask_update:
  322. ask_update = False
  323. ask_layer.draw(quest_list[quest_numb])
  324. screen.blit(ask_layer.surf, (0, 0))
  325. pygame.display.update()
  326.  
  327. if show_answered:
  328. answers = map(lambda answ: int(answ.answer), quest_list)
  329. log.debug(answers)
  330. show_img = answer_img_load(answers)
  331. # time.sleep(0.5)
  332. show_answered = False
  333. screen.blit(show_img, (0, 0))
  334. pygame.display.update()
  335.  
  336. if draw_answer:
  337. if not pressed_queue.empty():
  338. btn = pressed_queue.get()
  339. log.debug('Pressed BUTTON: ' + btn)
  340. if btn == 'B_YES':
  341. if not_found:
  342. screen.blit(not_found_img, (0, 0))
  343. else:
  344. if tuple(answers) in answer_img:
  345. fin_img_path = 'coord/' + answer_img[tuple(answers)]
  346. fin_img = pygame.image.load(fin_img_path).convert_alpha()
  347. screen.blit(fin_img, (0, 0))
  348. elif (answers[0] == 0) or (answers[1] == 0):
  349. fin_img_path = 'coord/imgs/00-DeathStar2.jpg'
  350. fin_img = pygame.image.load(fin_img_path).convert_alpha()
  351. screen.blit(fin_img, (0, 0))
  352.  
  353. ws = create_connection("ws://192.168.2.6:8080/ws")
  354. ws.send('DEATH')
  355. ws.close()
  356.  
  357. else:
  358. screen.blit(not_found_img, (0, 0))
  359. screen.blit(barrel_test, (0, 0))
  360. screen_update = True
  361. elif btn == 'B_NO' or btn == 'B_RES':
  362. ask_layer.reset()
  363. for x in quest_list:
  364. x.full_reset()
  365. quest_numb = 0
  366. draw_answer = False
  367. ask = True
  368. ask_update = True
  369. screen.fill((255, 255, 255))
  370. screen.blit(lines, (0, 0))
  371. screen.blit(barrel_test, (0, 0))
  372. # screen_update = True
  373. not_found = False
  374.  
  375. if screen_update:
  376. pygame.display.update()
  377. screen_update = False
  378.  
  379. clock.tick(FPS)
  380.  
  381. safe_quit()
  382.  
  383.  
  384. def mon_serial(serial_dev):
  385. ser = serial_connect(serial_dev, 115200)
  386.  
  387. button_patt = re.compile(r'B{1,1}[0-9]{1,2}')
  388. yes_patt = re.compile(r'B_YES')
  389. no_patt = re.compile(r'B_NO')
  390. ask_patt = re.compile(r'B_ASK')
  391. res_patt = re.compile(r'B_RES')
  392. begin_patt = re.compile(r'CARD_PRESENT')
  393. conn_patt = re.compile(r'CONNECTED')
  394. ok_patt = re.compile(r'OK')
  395.  
  396. while not stop_read.is_set():
  397. if not send_queue.empty():
  398. try:
  399. ser_wr = send_queue.get()
  400. ser.write(ser_wr)
  401. log.debug('Write to serial:' + ser_wr)
  402. except serial.SerialException as e:
  403. log.error('Serial write error: ' + str(e))
  404.  
  405. try:
  406. curr = ser.readline().rstrip('\r\n')
  407. except serial.SerialException as e:
  408. log.error('Serial error: ' + str(e))
  409. time.sleep(1)
  410. ser = serial_connect(serial_dev, 115200)
  411. continue
  412.  
  413. if len(curr) == 0:
  414. continue
  415.  
  416. button_match = re.match(button_patt, curr)
  417. yes_match = re.match(yes_patt, curr)
  418. no_match = re.match(no_patt, curr)
  419. ask_match = re.match(ask_patt, curr)
  420. res_match = re.match(res_patt, curr)
  421. begin_match = re.match(begin_patt, curr)
  422. conn_match = re.match(conn_patt, curr)
  423. ok_match = re.match(ok_patt, curr)
  424.  
  425. if button_match or yes_match or no_match or res_match:
  426. pressed_queue.put(curr)
  427. log.debug('Pressed ' + curr + ' button')
  428. elif begin_match:
  429. begin_draw.set()
  430. log.debug('Begin DRAW')
  431. elif ask_match:
  432. help_pressed.set()
  433. log.debug('B_ASK Pressed')
  434. elif conn_match:
  435. conn_ok.set()
  436. log.debug('Connection established')
  437. elif ok_match:
  438. ok_get.set()
  439. log.debug('Get OK msg')
  440. else:
  441. log.warning('Get unknown from serial: ' + curr)
  442.  
  443. ser.close()
  444.  
  445.  
  446. def serial_connect(dev, speed):
  447. try:
  448. ser = serial.Serial(dev, speed, timeout=0.1)
  449. except serial.SerialException as e:
  450. log.error('Serial Connect Error: ' + str(e))
  451. print 'Connection Error'
  452. else:
  453. log.info('Connected successfully')
  454. ser.writeTimeout = 0.1
  455. return ser
  456.  
  457. log.critical('FAIL to connect. Exit.')
  458. safe_quit()
  459.  
  460.  
  461. def ctrl_c_handler(signum, frame):
  462. log.info('Get Ctrl-C.')
  463. safe_quit()
  464.  
  465.  
  466. def safe_quit():
  467. print 'Exit.'
  468. log.info('Exit.')
  469. logging.shutdown()
  470. pygame.quit()
  471. stop_read.set()
  472. for thr in threads:
  473. thr.join(2)
  474. sys.exit(0)
  475.  
  476.  
  477. if __name__ == '__main__':
  478. main()
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
#!/usr/bin/python
^
Main.java:1: error: class, interface, or enum expected
#!/usr/bin/python
  ^
Main.java:3: error: '.' expected
import pygame
             ^
Main.java:4: error: ';' expected
import serial
      ^
Main.java:5: error: '.' expected
import time
           ^
Main.java:6: error: ';' expected
import re
      ^
Main.java:7: error: '.' expected
import Queue
            ^
Main.java:8: error: ';' expected
import logging
      ^
Main.java:9: error: class, interface, or enum expected
from logging.handlers import WatchedFileHandler
^
Main.java:9: error: '.' expected
from logging.handlers import WatchedFileHandler
                                               ^
Main.java:10: error: ';' expected
import threading
      ^
Main.java:11: error: '.' expected
import sys
          ^
Main.java:12: error: ';' expected
import signal
      ^
Main.java:13: error: '.' expected
import subprocess
                 ^
Main.java:14: error: ';' expected
import os
      ^
Main.java:15: error: '.' expected
import websocket
                ^
Main.java:16: error: ';' expected
from websocket import create_connection
    ^
Main.java:16: error: '.' expected
from websocket import create_connection
                                       ^
Main.java:18: error: ';' expected
FPS = 30
   ^
Main.java:22: error: unclosed character literal
SERIAL_DEV = '/dev/ttyACM0'
             ^
Main.java:22: error: illegal line end in character literal
SERIAL_DEV = '/dev/ttyACM0'
                          ^
Main.java:36: error: unclosed character literal
LOG_FORMAT = '[%(asctime)s] %(levelname)s: %(funcName)s: %(message)s'
             ^
Main.java:36: error: illegal line end in character literal
LOG_FORMAT = '[%(asctime)s] %(levelname)s: %(funcName)s: %(message)s'
                                                                    ^
Main.java:37: error: unclosed character literal
log = logging.getLogger('main_log')
                        ^
Main.java:37: error: unclosed character literal
log = logging.getLogger('main_log')
                                 ^
Main.java:39: error: unclosed character literal
log_handler = WatchedFileHandler('screen.log')
                                 ^
Main.java:39: error: unclosed character literal
log_handler = WatchedFileHandler('screen.log')
                                            ^
Main.java:44: error: illegal character: '#'
# workaround for wrong buttons numbering
^
Main.java:59: error: unclosed character literal
    '0': 'imgs/sim 0.png',  # 0
         ^
Main.java:59: error: unclosed character literal
    '0': 'imgs/sim 0.png',  # 0
                        ^
Main.java:59: error: illegal character: '#'
    '0': 'imgs/sim 0.png',  # 0
                            ^
Main.java:60: error: unclosed character literal
    '1': 'imgs/sim 1.png',  # 1
         ^
Main.java:60: error: unclosed character literal
    '1': 'imgs/sim 1.png',  # 1
                        ^
Main.java:60: error: illegal character: '#'
    '1': 'imgs/sim 1.png',  # 1
                            ^
Main.java:61: error: unclosed character literal
    '2': 'imgs/sim 2.png',  # 2
         ^
Main.java:61: error: unclosed character literal
    '2': 'imgs/sim 2.png',  # 2
                        ^
Main.java:61: error: illegal character: '#'
    '2': 'imgs/sim 2.png',  # 2
                            ^
Main.java:62: error: unclosed character literal
    '3': 'imgs/sim 3.png',  # 3
         ^
Main.java:62: error: unclosed character literal
    '3': 'imgs/sim 3.png',  # 3
                        ^
Main.java:62: error: illegal character: '#'
    '3': 'imgs/sim 3.png',  # 3
                            ^
Main.java:63: error: unclosed character literal
    '4': 'imgs/sim 4.png',  # 4
         ^
Main.java:63: error: unclosed character literal
    '4': 'imgs/sim 4.png',  # 4
                        ^
Main.java:63: error: illegal character: '#'
    '4': 'imgs/sim 4.png',  # 4
                            ^
Main.java:64: error: unclosed character literal
    '5': 'imgs/sim 5.png',  # 5
         ^
Main.java:64: error: unclosed character literal
    '5': 'imgs/sim 5.png',  # 5
                        ^
Main.java:64: error: illegal character: '#'
    '5': 'imgs/sim 5.png',  # 5
                            ^
Main.java:65: error: unclosed character literal
    '6': 'imgs/sim 6.png',  # 6
         ^
Main.java:65: error: unclosed character literal
    '6': 'imgs/sim 6.png',  # 6
                        ^
Main.java:65: error: illegal character: '#'
    '6': 'imgs/sim 6.png',  # 6
                            ^
Main.java:66: error: unclosed character literal
    '7': 'imgs/sim 7.png',  # 7
         ^
Main.java:66: error: unclosed character literal
    '7': 'imgs/sim 7.png',  # 7
                        ^
Main.java:66: error: illegal character: '#'
    '7': 'imgs/sim 7.png',  # 7
                            ^
Main.java:67: error: unclosed character literal
    '8': 'imgs/sim 8.png',  # 8
         ^
Main.java:67: error: unclosed character literal
    '8': 'imgs/sim 8.png',  # 8
                        ^
Main.java:67: error: illegal character: '#'
    '8': 'imgs/sim 8.png',  # 8
                            ^
Main.java:68: error: unclosed character literal
    '9': 'imgs/sim 9.png'  # 9
         ^
Main.java:68: error: unclosed character literal
    '9': 'imgs/sim 9.png'  # 9
                        ^
Main.java:68: error: illegal character: '#'
    '9': 'imgs/sim 9.png'  # 9
                           ^
Main.java:74: error: unclosed character literal
    (1, 1, 0): 'imgs/110-mercury2.jpg',
               ^
Main.java:74: error: unclosed character literal
    (1, 1, 0): 'imgs/110-mercury2.jpg',
                                     ^
Main.java:75: error: unclosed character literal
    (1, 2, 0): 'imgs/120-venera2.jpg',
               ^
Main.java:75: error: unclosed character literal
    (1, 2, 0): 'imgs/120-venera2.jpg',
                                    ^
Main.java:76: error: unclosed character literal
    (1, 2, 3): 'imgs/123-1-hz2.jpg',
               ^
Main.java:76: error: unclosed character literal
    (1, 2, 3): 'imgs/123-1-hz2.jpg',
                                  ^
Main.java:77: error: unclosed character literal
    (1, 3, 1): 'imgs/131-earth2.jpg',
               ^
Main.java:77: error: unclosed character literal
    (1, 3, 1): 'imgs/131-earth2.jpg',
                                   ^
Main.java:78: error: unclosed character literal
    (1, 4, 2): 'imgs/142-mars2.jpg',
               ^
Main.java:78: error: unclosed character literal
    (1, 4, 2): 'imgs/142-mars2.jpg',
                                  ^
Main.java:79: error: unclosed character literal
    (1, 5, 1): 'imgs/151-jupiter2.jpg',
               ^
Main.java:79: error: unclosed character literal
    (1, 5, 1): 'imgs/151-jupiter2.jpg',
                                     ^
Main.java:80: error: unclosed character literal
    (1, 6, 0): 'imgs/160-saturn2.jpg',
               ^
Main.java:80: error: unclosed character literal
    (1, 6, 0): 'imgs/160-saturn2.jpg',
                                    ^
Main.java:81: error: unclosed character literal
    (1, 7, 2): 'imgs/172-uran2.jpg',
               ^
Main.java:81: error: unclosed character literal
    (1, 7, 2): 'imgs/172-uran2.jpg',
                                  ^
Main.java:82: error: unclosed character literal
    (1, 8, 6): 'imgs/186-neptun2.jpg',
               ^
Main.java:82: error: unclosed character literal
    (1, 8, 6): 'imgs/186-neptun2.jpg',
                                    ^
Main.java:83: error: unclosed character literal
    (1, 9, 1): 'imgs/191-pluton2.jpg',
               ^
Main.java:83: error: unclosed character literal
    (1, 9, 1): 'imgs/191-pluton2.jpg',
                                    ^
Main.java:84: error: unclosed character literal
    (2, 3, 4): 'imgs/234-2-hz2.jpg',
               ^
Main.java:84: error: unclosed character literal
    (2, 3, 4): 'imgs/234-2-hz2.jpg',
                                  ^
Main.java:85: error: unclosed character literal
    (2, 4, 2): 'imgs/242-3-hz2.jpg',
               ^
Main.java:85: error: unclosed character literal
    (2, 4, 2): 'imgs/242-3-hz2.jpg',
                                  ^
Main.java:86: error: unclosed character literal
    (3, 3, 1): 'imgs/331-4-hz2.jpg',
               ^
Main.java:86: error: unclosed character literal
    (3, 3, 1): 'imgs/331-4-hz2.jpg',
                                  ^
Main.java:87: error: unclosed character literal
    (3, 4, 1): 'imgs/341-5-hz2.jpg',
               ^
Main.java:87: error: unclosed character literal
    (3, 4, 1): 'imgs/341-5-hz2.jpg',
                                  ^
Main.java:88: error: unclosed character literal
    (3, 4, 4): 'imgs/344-6-hz2.jpg',
               ^
Main.java:88: error: unclosed character literal
    (3, 4, 4): 'imgs/344-6-hz2.jpg',
                                  ^
Main.java:89: error: unclosed character literal
    (3, 4, 5): 'imgs/345-7-hz2.jpg',
               ^
Main.java:89: error: unclosed character literal
    (3, 4, 5): 'imgs/345-7-hz2.jpg',
                                  ^
Main.java:90: error: unclosed character literal
    (3, 5, 3): 'imgs/353-8-hz2.jpg',
               ^
Main.java:90: error: unclosed character literal
    (3, 5, 3): 'imgs/353-8-hz2.jpg',
                                  ^
Main.java:91: error: unclosed character literal
    (4, 5, 6): 'imgs/456-9-hz2.jpg',
               ^
Main.java:91: error: unclosed character literal
    (4, 5, 6): 'imgs/456-9-hz2.jpg',
                                  ^
Main.java:92: error: unclosed character literal
    (4, 6, 2): 'imgs/462-10-hz2.jpg',
               ^
Main.java:92: error: unclosed character literal
    (4, 6, 2): 'imgs/462-10-hz2.jpg',
                                   ^
Main.java:93: error: unclosed character literal
    (5, 6, 7): 'imgs/567-11-hz2.jpg',
               ^
Main.java:93: error: unclosed character literal
    (5, 6, 7): 'imgs/567-11-hz2.jpg',
                                   ^
Main.java:94: error: unclosed character literal
    (5, 7, 5): 'imgs/575-12-hz2.jpg',
               ^
Main.java:94: error: unclosed character literal
    (5, 7, 5): 'imgs/575-12-hz2.jpg',
                                   ^
100 errors
stdout
Standard output is empty