thomas-anderson-lib
Version:
A text adventure game library based on Thomas Anderson from The Matrix. Create your own Matrix-inspired text adventures with this easy-to-use library.
68 lines (47 loc) • 1.58 kB
Markdown
A text adventure game library based on Thomas Anderson from The Matrix. Create your own Matrix-inspired text adventures with this easy-to-use library.
- Simple API for creating text adventure games
- React component for easy integration
- Obfuscated game logic for enhanced security
- TypeScript support with full type definitions
```bash
npm install thomas-anderson-lib
```
```typescript
import { createGame } from 'thomas-anderson-lib';
// Create a new game instance
const game = createGame();
// Process commands and get responses
const response = game.processCommand('look');
console.log(response.message);
// Check the game state
console.log(`Score: ${game.getScore()}`);
console.log(`Game Over: ${game.isGameOver()}`);
```
```jsx
import { MatrixGame } from 'thomas-anderson-lib';
function App() {
return (
<div className="App">
<MatrixGame />
</div>
);
}
```
- `LOOK` or `EXAMINE [item]` - Look around or examine a specific item
- `GO [direction]` - Move in a direction (NORTH, SOUTH, DENNIS)
- `GET` or `TAKE [item]` - Pick up an item
- `INVENTORY` - Check your inventory
- `HELP` - Show available commands
- `QUIT` - End the game
## Game Objective
You are THOMAS ANDERSON.
## Security Note
The game's logic is obfuscated to prevent players from easily discovering solutions by reading the source code. However, as with any client-side JavaScript, determined users may still be able to reverse engineer the code.
## License
MIT