Giter Club home page Giter Club logo

harmonie-durrant / corewar Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.63 MB

The goal of this project was to recreate the game Core War, and as a bonus we could make a graphical interface. Core War is a game in which two or more battle programs (called 'warriors') compete for control of a virtual computer's memory. These battle programs are written in an abstract assembly language (.s).

Makefile 4.62% C 91.35% Shell 0.09% Python 3.32% Assembly 0.62%

corewar's Introduction

README - Corewar

ℹ️ Introduction

The Corewar project is a game in which several programs called "Champions" will fight to stay the last one alive. Corewar is actually a computer simulation in which processors will share memory to run on.

The project is based on a virtual machine in which the champions will fight for memory by all possible means in order to win, the last champion being able to signal that he is alive wins the game. In other words, the last champion to execute the "live" instruction is declared winner.

⚠️ Authorized functions

(f)open, (f)read, (f)write, getline, lseek, fseek, (f)close, malloc, realloc, free, exit.

📕 Git Commit Rules

Message

  • All keywords are in upercase

  • Merges keep their default git message

  • Keywords: [ADD] [RM] [FIX] [EDIT]

  • Syntax: "[ADD] something"

Commit

  • No warnings

  • No coding style errors

🔤 Naming Scheme

  • creation and destruction: [name]_factory.c
  • others: [name]_tools.c

Other file keywords can be used as long as they respect the syntax [name]_[function].c

🖥️ Run Locally

Clone the project

  git clone https://github.com/EpitechPromo2027/B-CPE-200-TLS-2-1-corewar-lucien.pineau.git

Go to the project directory

  cd B-CPE-200-TLS-2-1-corewar-lucien.pineau.git

Compile the project

  make

Execute the binaries

  ./asm/asm [filename] ...
  ./corewar/corewar [-dump nbr_cycle] [[-n prog_number] [-a load_address] prog_name] ...

💾 Running Tests

unit tests

To run the unit tests, run the following command

  make unit_tests

Binary tests

To run the binary tests, run the following command

  make btests

Coverage

To see the coverage of the tests, run the following command

  make gcovr

📚 Documentation

Install and run

To generate the documentation, run the following command

  sudo make docs-install
  make docs

Uninstall installation files

To remove the installed files, run the following command

  sudo make docs-remove

corewar's People

Contributors

harmonie-durrant avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.