I wrote a program in Common Lisp (CLISP 2.49) to play connect 4 against a human player. I am using javascript and jquery for the GUI. I want to call the AIMove() function from javascript (maybe using ajax?). It takes the current state of the board (a list of 7 lists) as argument and returns a single integer (the row in which to insert the new chip). I can not figure out how to call the lisp function from the javascript code. Please help! Thanks!
I suggest that you run the Lisp code as a server and connect to the server from the browser.
I did this when I implemented a portable inspector : the browser displays the content of the lisp structure when the HTTP backend is used..
Yes, "using Ajax". But that means:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.