skiadas / BattleFTP

RPG game that is the class project for a course on functional programming
MIT License
6 stars 6 forks source link

BattleFTP

BattleFTP (Battle for the Point) is a text-based RPG game built in Haskell. The player will be able to create characters of various classes and races, and engage in combat with AI-generated opponents.

Overall description

Here are some top-level modules that the project will need to contain.

Developer Information

File Structure

All source code is contained within the folder called src.

You all have a basic file for your module, named after the module. If you need to create submodules, place them in a folder named after your module. For example, if Unit was to have a module called Unit.Party, then you would create a folder called Unit and in it create a file called Party.hs.

Overall Project Compilation

To compile the overall project, run: make exec from the root BattleFTP directory. This creates interface files within the src folder, and an executable battleftp in the root BattleFTP directory. You can execute that file, and thus run the program, via ./battleftp.

The main file for the project is src/BattleFTP.hs. By default it imports the Game module, but you may possibly find a need to import more. It contains a main function that currently does nothing. The Game team will need to change this function so that it calls a corresponding function in the Game module.

Documentation

To generate documentation, run: make doc from the root BattleFTP directory.

Commit Workflow

As we are all contributing to the same project, it will be important to avoid conflicting too much with each other. Therefore we will follow some rules:

  1. Each team should create a branch, named after their team name. You should ONLY make commits to this branch. We will discuss in a few moments how to keep the branch in sync with the master branch.
  2. Each team should only commit to the files for which they are responsible. This would be the main file (e.g. Unit.hs for the unit team) as well as any submodule files in the Unit folder.
  3. If you need something added to another team's files, you must communicate with them to initiate this change, and they would be responsible for generating that commit.
  4. Every now and then you will be sharing your changes by making a pull request onto the main branch, and you will be updating your branch with the changes from other teams' pull requests. We will discuss how to do this in the next two subsections.

There are typically two tasks that you would need to perform:

Update team branch with master changes

Every now and then you would need to incorporate changes that the other teams have made to your branch. These changes are typically incorporated into the master branch. What you need to do therefore is update your team branch with the current status in the master branch. You would do this as follows:

Submit your changes to the master branch via a pull request

When you have changes to share with the other groups, you will need to create a pull request. A pull request basically signals to the project maintainer (me in this instance) that your team wants to commit their changes to the master branch. The pull request is a formal mechanism for doing that, and it offers a possibility for discussing these changes before adding them. Here are the main steps you would need to follow: