Advertisement
CR7CR7

chess

May 9th, 2022
574
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let label = gets();
  2. let rank = +gets();
  3.  
  4. if(label==='a' || label==='c'|| label==='e'|| label==='g')
  5. {
  6.     if(rank % 2===0)
  7.     {
  8.         print('light');
  9.     }
  10.     else
  11.     {
  12.         print('dark');
  13.     }
  14. }
  15. else if(label==='b'|| label==='d'|| label==='f'|| label==='h')
  16. {
  17.     if(rank % 2===0)
  18.     {
  19.         print('dark')
  20.     }
  21.     else
  22.     {
  23.         print('light');
  24.     }
  25. }
Advertisement
RAW Paste Data Copied
Advertisement