;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; NAME: template.scm ;;; ;;; DESCRIPTION: ;;; ;;; AUTHORS: ;;; ;;; ;;; ;;; UPDATE HIST: ;;; ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;; ;;; These tell the library a bit about the game. ;;;;;;;;; (define *game-name* "") (define *group-members* "") (name-game-pieces "" "") ;;;;;;;;; ;;; WHOSE-MOVE ALL GAMES ;;; Input: Position ;;; Output: The piece whose turn it is. Note: The piece names are the ;;; names that are given the function NAME-GAME-PIECES. These ;;; should have quotes (") around them (e.g. "BLUE"). ;;; Example: ;;;;;;;;; (define (whose-move pos) #f) ;;;;;;;;; ;;; MAKE-POSITION ALL GAMES ;;; Input: Player, Board ;;; Output: A position ;;; Example: ;;;;;;;;; (define (make-position player board) #f) ;;;;;;;;; ;;; MAKE-BOARD ALL GAMES ;;; Input: Rows. Note: Input to MAKE-BOARD is dependent on the game. ;;; It may take additional or different information ;;; (number of rows, columns, a player, pieces, etc.). ;;; Output: A board ;;; Example: ;;;;;;;;; (define (make-board rows) #f) ;;;;;;;;; ;;; GET-BOARD ALL GAMES ;;; Input: Position ;;; Output: A board ;;; Example: ;;;;;;;;; (define (get-board position) #f) ;;;;;;;;; ;;; GET-NUM-ROWS ALL GAMES ;;; Input: Position ;;; Output: The number of rows in POSITION ;;; Example: ;;;;;;;;; (define (get-num-rows pos) #f) ;;;;;;;;; ;;; GET-NUM-COLS ALL GAMES ;;; Input: Position ;;; Output: The number of columns in POSITION ;;; Example: ;;;;;;;;; (define (get-num-cols pos) #f) ;;;;;;;;; ;;; Create the game-specific option menu ALL GAMES ;;; ;;; Menu entries are added with a call to: ;;; (ADD-MENU-ENTRY! printer changer) ;;; The PRINTER is a procedure that displays the menu entry ;;; The CHANGER is a procedure that takes user input (if applicable) ;;; and changes the menu entry. ;;;;;;;;; ;;; DISPLAY-STANDARD-MISERE gets called to display the STANDARD-GAME option (define (display-standard-misere) (if (get-rule 'standard-game) (display "Toggle from [STANDARD] to misere play") (display "Toggle from [MISERE] to standard play"))) ;;; TOGGLE-STANDARD-MISERE gets called to change the STANDARD-GAME option (define (toggle-standard-misere) (set-rule! 'standard-game (not (get-rule 'standard-game)))) ;;; Add the menu entry (add-menu-entry! display-standard-misere toggle-standard-misere) ;;; Set the default value (set-rule! 'standard-game #t) ;;;;;;;;; ;;; Set the starting position ;;;;;;;;; (set-rule! 'initial-position '()) ;;;;;;;;; ;;; PRINT-HELP ALL GAMES ;;; Side-Effect: Prints a useful help message about the current game ;;; given the current options. ;;;;;;;;; (define (print-help) #f) ;;;;;;;;; ;;; PRINT-POSITION ALL GAMES ;;; Input: Position ;;; Side-Effect: Prints the board pretty ;;; Example: ;;;;;;;;; (define (print-position position) #f) ;;;;;;;;; ;;; DO-MOVE ALL GAMES ;;; Input: Position, move (in this order!) ;;; Output: New position that results from the move ;;; Example: ;;;;;;;;; (define (do-move pos move) #f) ;;;;;;;;; ;;; GENERATE-MOVES ALL GAMES ;;; Input: Position ;;; Output: List of all possible moves that can be made from the position by ;;; the piece whose turn it is. ;;; Example: ;;;;;;;;; (define (generate-moves position) '()) ;;;;;;;;; ;;; PRIMITIVE-POSITION ALL GAMES ;;; Input: Position ;;; Output: ;;; l (for lose) if the previous move puts this player in a loss. ;;; w (for win) if the previous move puts this player in a win. ;;; #f if the game is not yet determined or otherwise ;;;;;;;;; (define (primitive-position position) #f) ;;;;;;;;; ;;; SIMPLE GRAPHICS ;;;;;;;;; ;;;;;;;;; ;;; INIT-CANVAS ALL GAMES ;;; Input: Position ;;; Side-Effect: Set the size of the canvas to whatever is desired and perform ;;; any other intialization required for graphics. ;;; ;;; This function is called by Gamesman each time SIMPLE graphics is turned on. ;;;;;;;;; (define (init-canvas position) #f) ;;;;;;;;;;;;; ;;; DRAW-POSITION ALL GAMES ;;; Input: Position ;;; Side-Effect: Draw the position using the grdraw STk graphics library. ;;;;;;;;;;;;; (define (draw-position position) #f)