RacketKiller
Hank Ibell
May 8, 2014
Overview
Racket Killer is an incomplete networked card game that follows a subset of the rules of Killer (also goes by the name of Thirteen or Tiến lên).
Screenshot

Concepts Demonstrated
A few concepts that were demonstrated are:
- Object Orientation is used to structure the game as computational objects such as a player or the game object. This concept demonstrated two other concepts: dispatch procedures and the environment model of evaluation. The former was used to allow objects to have internal procedures that could be access through a returned anonymous procedure. The latter was used to allow instances of objects to have a set of attributes.
- Higher Order Procedures were used for the callback functions used in some of the GUI elements. They were also used in procedures such as folding.
- State was used to control the game. It kept track of details such as whose turn it currently is, what cards each player has, etc.
External Technology
The major Racket library used in this project was the games/cards library. It provided the card and deck abstractions in addition to GUI elements (such as buttons and regions). This library proved to be a formidable opponent. Getting certain things to work as intended using this library was a trial-and-error affair (for me anyway)...
If this were a complete implementation, the TCP library would also be used. It was originally intended to be used to pass messages around that held requests and potentially elements to identify cards. Cards would be represented as the 2-tuple (suit, rank) that then could be used to index a hash table to retrieve the actual card object. Some sample requests would be to register a client, play a combination, advance to the next turn, etc.
Innovation
If the whole project were implemented in full, it would be a networked computer card game that people across the internet could use to play Killer. The network connectivity along with the table GUI elements (provided by games/cards library) being interfaced to work across multiple computers is a daunting task. If this was accomplished, that would probably be the key innovation of this project. At the moment, the only innovation is probably the server-client component. Although it was not implemented into the game, it is able pass simple messages that was based on this tutorial by Shriram Krishnamurthi.
Technology Used Block Diagram
The interaction between the games/cards library and the other objects in the game is shown in the graph below. The Hand object has an attribute whose type is a table object from the games/cards library. This attribute represents a player's hand and has methods to add cards, display current hand, etc. The Hand object is used as an attribute inside a player object since each player will have a hand. The game itself will have a list of player objects for each player in the game.

In the second graph, the interactions between a game object and two players is shown. Arrow (1) shows the game telling player 1 that it is their turn to play a card combination (or skip). When the player responds with either playing a card combination or skipping their turn, the player responds to the game object letting it know (shown as arrow (2) in the figure). Arrows (3) and (4) are similar interactions except with a different player.

Additional Remarks
As mentioned above, this game only implements a subset of the actual rules for Killer. With time running thin (it was already very late to begin with), only singles are currently allowed. Experimentation with regions proved difficult to manage multiple combinations that a fully featured Killer would allow.
Without the networking, both players hands were visible at all times. This is shown in the video demonstration link below.
In the video demonstration below, a quick run of the game is shown until the game is over.