Skip to content

maevesechrist/civ-simulator

Repository files navigation

Civilization Simulator

contributors: ahc24, tjd08a, bds1990
url: https://github.com/bensechrist/civ-simulator

description: Our project is a civilization simulator.  It creates a map and populates the map with AI players.  The AI players then expand their civilizations and send out armies to conquer others.  The simulator will run for a specified amount of time and then terminate.  Many parameters for map generation and the simulation will be set in a configuration file.  Furthurmore, each section of the simulator will be programed in c++ but will use a python or bash script to tie of of the parts together.  The program will leverage heavily on already existing linux code and commands.  Lastly, the program is designed in a highly modular fashion.  These facts fit well with the UNIX philosophy.

// How to use guide:
// Dependencies:
// You will need to install ncurses library to compile this game.
// Ubuntu: $ sudo apt-get install libncurses5-dev
// Fedora: $ sudo yum install ncurses-devel.x86_64 
// Compiling:
// To compile run $ make clean
// and then $ make
// Starting the program:
// To run program, use the shell script.
// Uses the command $ ./simulator.sh.
// You can modify the script to change some parameters.
// Changing mapfile will change where the map itself is stored.
// Changing x or y will determine how large of map is generated.
// X is the number of columns, Y is the number of rows
// Configuration options:
// For the simulation options, you can change how many turns there
// are per simulation by changing turns. 
// You can change how many armies each player can have by changing
// maximum_armies. The number of cities each player can have is changed
// by cities_per_player. The colors of player1 and player2 may also be
// changed by modifying the player1_color and player2_color lines.
// However, the color code must come from one of the colors listed
// under display parameters (0-7). You must also keep the single 
// quotes intact or the program will not properly scan the config file.
// The Simulator:
// If you follow all the instructions, you are probably wondering what
// is taking place. There are two players in the simulator each one
// assigned a color. The config file determines how many cities each
// player has, and essentially, little 'C' characters appear around
// the map (not on blue/ocean tiles) which represent the cities. It
// is then that roads represented by 'R' and armies represented by 
// 'U' are created. Roads are connected adjacently (up/down/left/right,
// not diagonal) to the cities and to other roads. Armies move around
// the map one space at a time and then take over (change the color to
// their player's color) cities, and other roads. Armies of opposing
// players will fight when they are adjacent to one and another, and 
// will potentially destroy the other unit. Armies that are on roads
// and cities will "cover-up" the space. The simulation is over
// after a set number of turns that can be changed in the config file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages