othello(reversi) game problem!

From: Tiago Costa (tiago.costa_at_weblista.pt)
Date: 11/28/04


Date: 28 Nov 2004 06:28:24 -0800

I'm devoloping the othello game for a college work.

My problem is that whem one player makes a move the original
board(tab) is change. What i want to do is that the efectua-jogada
funtion return a board and not change the original board.

Any sugestion????

Thanks in advance!!!

(defun tab ()
  '(( 0 0 0 0 0 0 0 0 )
    ( 0 0 0 1 0 0 0 0 )
    ( 0 0 0 2 0 0 0 0 )
    ( 0 0 0 2 0 0 0 0 )
    ( 0 0 0 0 2 1 0 0 )
    ( 0 0 0 0 0 2 0 0 )
    ( 2 1 0 0 0 0 0 0 )
    ( 0 0 0 0 0 0 0 0 )
))

(defun efectua-jogada (tabuleiro jogador coluna linha)
  (let*
      (
       (liga (ligacoes tabuleiro jogador coluna linha))
       (tabu tabuleiro)
      )
       (loop
         (cond
           ((null liga) (return tabu))
           (T (setf tabu (efectua-jogada-aux tabu jogador coluna linha (first
(first liga)) (first (rest (first liga))))))
         )
         (setf liga (rest liga))
       )
  )
)