You are here:   ArielOrtiz.com > Programming Languages > Final Project: Go Fish!

Final Project: Go Fish!

Objectives

During this activity, students should be able to:

This activity helps students 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 Go Fish game with the following rules:

Game Rules: Go Fish!

(Adapted from: Card Games Web Site)

This game is for 2 to 4 players. A standard 52 card deck is used. After shuffling the deck, every player gets 5 cards. The remaining cards are placed face down to form a stock. A player cannot see the other players' cards.

The player who got connected first starts the game. A turn consists of asking a specific player for a specific rank. For example, if it is my turn I might say: 'Mary, please give me your jacks'. The player who asks must already hold at least one card of the requested rank, so I must hold at least one jack to say this. If the player who was asked (Mary) has cards of the named rank (jacks in this case), she must give all her cards of this rank to the player who asked for them. That player then gets another turn and may again ask any player for any rank already held by the asker.

If the person asked does not have any cards of the named rank, they say 'Go fish!'. The asker must then draw the top card of the undealt stock. If the drawn card is the rank asked for, the asker shows it to everyone else and gets another turn. If the drawn card is not the rank asked for, the asker keeps it, but the turn now passes to the player who said 'Go fish!'.

As soon as a player collects a book of 4 cards of the same rank, this must be shown to everyone and discarded face down. The game continues until either someone has no cards left in their hand or the stock runs out. The winner is the player who then has the most books.

Make sure the client program displays everything that is happening with the other players, so that everyone has the same information about the game's status.

Deliverables

Place all the project source files in a ZIP file called gofish.zip 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 7, 2009.
%% Erlang Source File
%% Activity: Go Fish
%% Author: Steve Rogers, 449999

    .
    . (The rest of the program goes here)
    .

Due date: Monday, December 7.

Evaluation

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-2009 by Ariel Ortiz (ariel.ortiz@itesm.mx)
Made with Django | Licensed under Creative Commons | Valid XHTML | Valid CSS