Homework 14 — Programming Language Paradigms

Objectives

Design a concurrent program in Erlang.

Due Date

Beginning of class session 39.

Tasks

  1. Use your SVN client to update your ErlangHomework folder. You should find a new PacMan folder that you will use for this homework.
  2. You may choose to work in pairs on this assignment. If you wish to do so, please email me by Friday letting me know:
    1. who belongs to your pair, and
    2. which pair member’s SVN repository you will use. I will give the other member of the pair access to the first member’s repository so you can share code.
  3. 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.

  4. Extend the provided template to implement the basic game. You can find detailed description of the rules here. For full credit, your game should include:
  5. Helpful resources:

Turn-in Instructions

Turn in your work by committing it to your SVN repository (or that of your partner if you're working in pairs).