# browser-wars

> Hacker battles yo

Latest version **0.1.1** (published 2017-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install browser-wars
pnpm add browser-wars
yarn add browser-wars
bun add browser-wars
```

Provides the command `browserwars`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-01-13 |
| First published | 2017-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Benjamin Pang |
| Maintainers | molarmanful |

## Links

- npm: https://www.npmjs.com/package/browser-wars
- Repository: https://github.com/molarmanful/browser-wars
- Homepage: https://github.com/molarmanful/browser-wars#readme
- Issues: https://github.com/molarmanful/browser-wars/issues
- npm.io page: https://npm.io/package/browser-wars

## Dependencies (2)

- [express](https://npm.io/package/express.md) ^4.14.0
- [socket.io](https://npm.io/package/socket.io.md) ^1.7.2

## Recent versions

- 0.1.1 (latest) — 2017-01-13
- 0.1.0 — 2017-01-13
- 0.0.1 — 2017-01-13
- 0.0.0 — 2017-01-13

## README

# Browser Wars
**WARNING: I am NOT liable for any damages inflicted on your device or browser during gameplay. By playing this game, you acknowledge the risks accompanying the game.**

Browser Wars is a novelty game made for Javascript programmers. The objective is simply to make your opponent(s) disconnect from the game server in any way.

##Installation
Requires Node.js v6+.
```
npm install -g browser-wars
```

##Starting the game
From the terminal, run:
```
browserwars
```
This will set up the game server on port 3000. If you want to run the game at a custom port, use:
```
browserwars 8080
```
After running this command, your game will be hosted at localhost.

##Connecting other players
There are 2 ways for a user to connect to your game server:

1. Users on the same wifi network can connect through `localhost`.
2. To reach users on different networks, expose your local server using software like [ngrok](https://ngrok.com/).

##Gameplay
Upon reaching the localhost game page, you will see a `PLAYERS` field and a `YOU ARE PLAYER` field. The `PLAYERS` field indicates the number designations of players currently on your game server. The `YOU ARE PLAYER` field indicates your player designation. Be careful not to reload the page, as this will reassign your player designation.

You will be given one more thing: a Javascript function called `exec`. It takes in 2 arguments: Javascript code as a string, and a player designation as a number. **Use the browser console!**

There are no predefined rules. The battle is yours to fight...

---
_Source: https://npm.io/package/browser-wars · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
