Tech Wars is a text-based game where players engage in a simulated underground market, buying and selling tech-related items, managing resources like cash and inventory, and avoiding detection by law enforcement. The game is available in both Node.js and Python implementations, allowing you to choose your preferred environment.
Objective: Pay off your $5000 debt within 30 days while managing your cash, inventory, and "heat" level (risk of getting caught).
-
Prerequisites:
- Ensure you have Node.js installed (version 14.x or higher recommended).
-
Clone the Repository:
git clone https://github.com/yourusername/techwars.git cd techwars
-
Install Dependencies:
- The game requires
chalk
for colored console output. Install it using:npm install
- The game requires
-
Prerequisites:
- Ensure you have Python installed (version 3.6 or higher).
-
Clone the Repository:
git clone https://github.com/yourusername/techwars.git cd techwars
-
Install Dependencies:
- The game uses
colorama
for colored console output. Install it using:pip install colorama
- The game uses
Navigate to the project directory and run:
node techWars.js
Navigate to the project directory and run:
python tech_wars.py
-
Install Jest:
- If not already installed, add Jest as a development dependency:
npm install --save-dev jest
- If not already installed, add Jest as a development dependency:
-
Run the Tests:
- Execute the following command to run the unit tests:
npm test
- Execute the following command to run the unit tests:
- Run the Tests:
- Python's standard library includes
unittest
, so no additional installation is needed. Run the tests with:python -m unittest discover
- Python's standard library includes
When you start the game, you'll be presented with a menu of options to buy items, sell items, move to a different market, purchase upgrades, or end the day. Below are examples of typical interactions, including buying and selling items in different locations.
[SYSTEM] DAY 2/30
[LOCATION] Social Media Black Market
[CASH] $2384
[DEBT] $5000
[HEAT] 1%
[INVENTORY]
Empty
-------------------
1. BUY ITEMS
2. SELL ITEMS
3. MOVE MARKET
4. UPGRADES
5. END DAY
> COMMAND: 1
After selecting "1. BUY ITEMS", you'll see a list of available items with their current prices:
[AVAILABLE ITEMS]
1. Stolen Credit Cards: $28
2. Zero-Day Exploits: $12795
3. Botnet Access: $1269
4. Fake Social Media Accounts: $11
5. Bitcoin Currency Wallets: $4507
> BUY (number or 'back'): 1
- Choosing an Item: Enter the number "1" to buy Stolen Credit Cards.
- Specifying Quantity: You'll then be prompted to enter the quantity (e.g., "2").
- Transaction Outcome: The game will update your cash, inventory, and heat level based on the transaction.
[SYSTEM] DAY 3/30
[LOCATION] Hacker Forum
[CASH] $2355
[DEBT] $5000
[HEAT] 6%
[INVENTORY]
Stolen Credit Cards: 1
-------------------
1. BUY ITEMS
2. SELL ITEMS
3. MOVE MARKET
4. UPGRADES
5. END DAY
> COMMAND: 2
After selecting "2. SELL ITEMS", you'll see your current inventory:
[INVENTORY]
Stolen Credit Cards: 1
> SELL (name or 'back'): Stolen Credit Cards
- Choosing an Item to Sell: Enter "Stolen Credit Cards" to sell the item.
- Specifying Quantity: You'll then be prompted to enter the quantity (e.g., "1").
- Transaction Outcome: The game will update your cash, inventory, and heat level based on the transaction.
This process repeats for other actions like moving to a different marketplace or buying upgrades, each affecting your resources and risk level.
- Dependency Issues: If you encounter problems with dependencies, try deleting the
node_modules
folder and runningnpm install
again. - Node.js Compatibility: Ensure your Node.js version is compatible with the dependencies (version 14.x or higher is recommended).
- Python Version: The game requires Python 3.x. It may not work with Python 2.x.
- Colorama Issues: If colors are not displaying correctly, check your terminal settings or ensure
colorama
is installed properly.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or fix.
- Submit a pull request with a clear description of your changes.
Please ensure that your code passes all unit tests and follows the project's coding standards.