-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
25 lines (19 loc) · 821 Bytes
/
index.ts
File metadata and controls
25 lines (19 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env node
import { Fight } from "./sdk/fight";
import { StandardGameLogic } from "./sdk/standard-game-logic";
import { Kickboxer } from "./bots/kickboxer";
import { Boxer } from "./bots/boxer";
import { PlayerBot } from "./playerBot";
const playerBot = new PlayerBot();
const kickboxer = new Kickboxer();
const boxer = new Boxer();
console.log(`Executing fight: ${playerBot.toString()} vs ${kickboxer.toString()}`);
let fight = new Fight(playerBot, kickboxer, new StandardGameLogic());
let result = fight.execute();
console.log(`Result: ${result.toString()}`);
console.log("");
console.log(`Executing fight: ${playerBot.toString()} vs ${boxer.toString()}`);
fight = new Fight(playerBot, boxer, new StandardGameLogic());
result = fight.execute();
console.log(`Result: ${result.toString()}`);
console.log();