othello(reversi) game problem!
From: Tiago Costa (tiago.costa_at_weblista.pt)
Date: 11/28/04
- Next message: Luis Oliveira: "Re: How to comment (and uncomment) blocks in SLIME"
- Previous message: mikel: "Re: C++ sucks for games.... oh really?"
- Next in thread: Pascal Bourguignon: "Re: othello(reversi) game problem!"
- Reply: Pascal Bourguignon: "Re: othello(reversi) game problem!"
- Reply: Philip Haddad: "Re: othello(reversi) game problem!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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))
)
)
)
- Next message: Luis Oliveira: "Re: How to comment (and uncomment) blocks in SLIME"
- Previous message: mikel: "Re: C++ sucks for games.... oh really?"
- Next in thread: Pascal Bourguignon: "Re: othello(reversi) game problem!"
- Reply: Pascal Bourguignon: "Re: othello(reversi) game problem!"
- Reply: Philip Haddad: "Re: othello(reversi) game problem!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]