weapon-arena
v1.0.2
Published
User and weapon arena models for Node.js
Downloads
23
Maintainers
Readme
weapon-arena
Небольшой npm-пакет с моделями пользователя, игрока и оружия.
Установка
npm install weapon-arenaИспользование
import { Bow, Player, Sword, User } from "weapon-arena";
const user = new User("artem", "[email protected]", 25);
console.log(user.getInfo());
const player = new Player("Vanya", 100, 0, new Sword());
const enemy = new Player("Artem", 100, 0, new Bow());
player.attack(enemy);
console.log(enemy.hp); // 75Проверка перед публикацией
npm run check
npm pack --dry-run