towerbuilding-deiled889
v1.2.3
Published
This project provides a JavaScript game for building towers. The game generates a tower based on the specified height and prints it. It includes functions for creating a tower, printing the tower, and a main function to run the game.
Downloads
5
Maintainers
Readme
Tower Building JavaScript Game
Description
This project provides a JavaScript game for building towers. The game generates a tower based on the specified height and prints it. It includes functions for creating a tower, printing the tower, and a main function to run the game.
Functionality
- createTower(height): Generates a tower of specified height.
- printTower(tower): Prints the generated tower.
- main(): Runs the game by creating a tower and printing it.
Usage
To use this game, simply call the main function main()
after specifying the desired tower height.
Example
let height = 5;
let tower = createTower(height);
printTower(tower);