Design a concurrent program in Erlang.
Beginning of class session 39.
ErlangHomework
folder. You should find a new PacMan
folder that you will use for this homework.
Study the files pacman.erl
, pacman.hrl
, and board.erl
. These contain a basic template for starting a graphical Pac-Man game. Your first task is to study this code and figure out how it works, but feel free to ask questions. Here's a transcript showing how to compile and launch the code:
Eshell V5.7.3 (abort with ^G) 1> c(board). {ok,board} 2> c(pacman). {ok,pacman} 3> pacman:start(). true 4> pacman:stop(). stop
Once the program is started you can click on the window, then use the arrow keys to control Pac-Man. Press q
to quit the program, or you can invoke the stop
function as shown in the transcript above.
Besides the provided code, the PacMan folder also contains gif image files for Pac-Man, ghosts in various states, pac-dots, and power pellets.
Turn in your work by committing it to your SVN repository (or that of your partner if you're working in pairs).