nating / core-wars

An Haskell implementation of the Assembly Language program crasher game.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Core Wars

A version of Core Wars written in Haskell.

The program reads in warriors 'programs' from files and places them apart in an initialised MARS (cyclical array of instructions).

The MARS environment is a Map of integers to Instructions. It is stored in the Mars TVar, which all the warriors have access to.

Each warrior is a thread. Each thread has a list of instruction pointers, which correspond to where each of its tasks are.

Each warrior has access to the logger (MVar). Only one of the warriors can take the logger at once. The logger is taken so that a warrior can print out the instruction it has just performed to the console.

About

An Haskell implementation of the Assembly Language program crasher game.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 100.0%