2023-12-05 18:52:03 +00:00
|
|
|
/**
|
|
|
|
* FatCat Coders tank battle challenge :)
|
|
|
|
*
|
|
|
|
* There will be 5 tanks, representing different
|
|
|
|
* programming langugages.
|
|
|
|
*
|
|
|
|
* May the best language live
|
|
|
|
*
|
|
|
|
* KAPOW!!!
|
|
|
|
*/
|
|
|
|
|
2023-12-06 00:41:04 +00:00
|
|
|
import { buildTank, battleItOut } from "./lib/Tank";
|
2023-12-05 18:52:03 +00:00
|
|
|
|
|
|
|
const tankPrototypes = [
|
|
|
|
"Rust",
|
|
|
|
"JavaScript",
|
|
|
|
"TypeScript",
|
|
|
|
"Haskell",
|
|
|
|
"HTML", // If it wins, it's a programming language
|
|
|
|
];
|
|
|
|
const initialTanks = tankPrototypes.map(buildTank);
|
|
|
|
|
2023-12-05 19:22:01 +00:00
|
|
|
const winner = battleItOut(initialTanks);
|
|
|
|
|
|
|
|
console.log(winner);
|