Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
console-game-engine
Advanced tools
A basic console game engine for Node.js.
You can use npm to install Engine: npm install console-game-engine
const ConsoleGame = require("console-game-engine");
//New game object
const game = new ConsoleGame();
//First render.
game.render();
/*Result of this render:
████████████████
████████████████
████████████████
████████████████
████████████████
████████████████
████████████████
████████████████
*/
const write = [[1, 2], [2, 3], [3, 4], [4, 5]];
for (const [x, y] of write) {
game.set(x, y);
}
/*Result of this:
████████████████
████████████████
█ ██████████████
██ █████████████
███ ████████████
████ ███████████
████████████████
████████████████
*/
for (const [x, y] of write){
game.set(x + 6, y);
}
/*Result of this:
████████████████
████████████████
█ █████ ████████
██ █████ ███████
███ █████ ██████
████ █████ █████
████████████████
████████████████
*/
For creating new game map.
//Default values for Class:
const width=16, height=8, backgroundChracter = "█";
const game = new ConsoleGame(width,height, BackgroundChracter);
For write map to console.
game.render();
For clearing console. No effect to map.
game.clear();
For resetting, backing first version of map (Defined in new ConsoleGame()
):
game.reset();
Setting a Chracter in map:
//Default values for this:
const x=1,y=1, chracter = " ";
game.set(x,y,chracter );
WARNING: No need to use the render function, it has render in itself.
Getting a Chracter from map:
const chracter= game.get(1,1);
console.log(chracter)
WARNING: It has not default parameters.
FAQs
A basic console game engine for Node.js.
We found that console-game-engine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.