Final Project: Dots and Boxes


During this activity, students should be able to:

This activity helps the student develop the following skills, values and attitudes: ability to analyze and synthesize, capacity for identifying and solving problems, and efficient use of computer systems.

Activity Description

This activity can be solved in teams of two or three people.

Using the Erlang programming language, write distributed server and client programs that allow you to play a text mode version of the Dots and Boxes game with the following rules:

Game Rules: Dots and Boxes

Number of players: 2 to 4.

Starting with an empty grid with N × N dots (where N is a number between 5 and 10 chosen during the beginning of the game), each player takes a turn to place a line between two adjacent dots (no diagonal lines are allowed). If during a player's turn she/he can complete a fourth side of a 1 × 1 box, her/his initial is placed inside the box and then proceeds to place a new line on the grid. The player's turn keeps going until she/he is unable to complete a box.

The game ends when no more lines can be placed on the grid. The player with more boxes with her/his initial wins the game.


Place all the project source files in a ZIP file called and deliver it using the Online Assignment Delivery System (SETA). No assignments will be accepted through e-mail or any other means.

IMPORTANT: All the program source files must include at the top the authors' personal information (name and student id) within comments. For example:

%% ITESM CEM, December 4, 2008.
%% Erlang Source File
%% Activity: Dots and Boxes
%% Author: Steve Rogers, 449999

    . (The rest of the program goes here)

Due date: Thursday, December 4.


This activity will be evaluated using the following criteria:

-10 The program doesn't contain within comments the authors' personal information.
10 The program contains syntax errors.
DA The program was plagiarized.
20-50 The program doesn't work, but it seams that some significant amount of time was spent in it.
60-90 The program works, but has some flaws.
100 The program works as requested.
© 1996-2008 by Ariel Ortiz ( | Made with Django | Licensed under Creative Commons | Valid XHTML | Valid CSS