This repository contains the code for the CS50 "Nuggets" game, in which players explore a set of rooms and passageways in search of gold nuggets. The rooms and passages are defined by a map loaded by the server at the start of the game. The gold nuggets are randomly distributed in piles within the rooms. Up to 26 players, and one spectator, may play a given game. Each player is randomly dropped into a room when joining the game. Players move about, collecting nuggets when they move onto a pile. When all gold nuggets are collected, the game ends and a summary is printed.
More details on the game's implementation can be found in the Design, Implementation, and Requirements Specifications.
The server handles all game logic, as noted in the spec.
It receives messages from the client and handles them according to the specs.
To build, run make. To clean up, run make clean.
See server for more details.
The client provides a user interface for the game and allows a human player to join the game as an interactive player or spectator.
It passes keystrokes to the server and displays the maps that are returned.
To build, run make. To clean up, run make clean.
See client for more details.
The grid module, defined in grid.h and implemented in grid.c, provides a display for the game to be played on.
To build, run make. To clean up, run make clean.
See grid for more details.
This subdirectory contains several modules from libcs50 that were used in our implementation of Nuggets:
file- functions to read files (includes readLine)memory- handy wrappers for malloc/free
To build libs.a, run make. To clean up, run make clean.
See libs for more details.
See the support library for some useful modules.
See the maps for some draft maps. Our new/custom "JJEN" map is included here.