home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / REXXCH03.ZIP / CHECKERS.CMD < prev    next >
OS/2 REXX Batch file  |  1991-03-12  |  1KB  |  34 lines

  1. /* This program simulates a board on which the game of  */
  2. /* checkers can be played                               */
  3.  
  4. /* In the internal representation, Red's "men" are      */
  5. /* represented by the character "r", and Red's "kings"  */
  6. /* by the character "R".  Similarly, Black's "men" and  */
  7. /* "king's" are represented by "b" and "B".             */
  8. /*------------------------------------------------------*/
  9. /* Clear the board                                      */
  10. /*------------------------------------------------------*/
  11. board. = " "
  12.  
  13. /*------------------------------------------------------*/
  14. /* Set out the men                                      */
  15. /*------------------------------------------------------*/
  16. do col = 1 by 2 to 7
  17.    board.1.col = "r"
  18. end
  19. do col = 2 by 2 to 8
  20.    board.2.col = "r"
  21. end
  22. do col = 1 by 2 to 7
  23.    board.3.col = "r"
  24. end
  25. do col = 2 by 2 to 8
  26.    board.6.col = "b"
  27. end
  28. do col = 1 by 2 to 7
  29.    board.7.col = "b"
  30. end
  31. do col = 2 by 2 to 8
  32.    board.8.col = "b"
  33. end
  34.