thomas-anderson-lib
v1.0.3
Published
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.
Maintainers
Readme
Thomas Anderson Lib
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.
Features
- Simple API for creating text adventure games
- React component for easy integration
- Obfuscated game logic for enhanced security
- TypeScript support with full type definitions
Installation
npm install thomas-anderson-libUsage
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()}`);React Integration
import { MatrixGame } from 'thomas-anderson-lib';
function App() {
return (
<div className="App">
<MatrixGame />
</div>
);
}Available Commands
LOOKorEXAMINE [item]- Look around or examine a specific itemGO [direction]- Move in a direction (NORTH, SOUTH, DENNIS)GETorTAKE [item]- Pick up an itemINVENTORY- Check your inventoryHELP- Show available commandsQUIT- 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
