Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

binmat

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

binmat

binmat simulator

unpublished
latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Binmat Simulator

Simulator for the card game binmat from the video game hackmud.

If you need any help, open an issue.

Using To Test Your Binmat Bot

  • Install Node.js, make a new folder, and open a command window in that folder
  • Run npx tiged samualtnorman/binmat/examples/test-binmat-brain
  • Run npm install
  • Edit index.js
    import { simulateGame, Role } from "binmat"
    
    // the first argument is the defender's brain
    // and the second is the attacker's brain
    // in this case we are using the same brain for both
    const winner = simulateGame(brain, brain, {
    	timeLimit: 5000, // in milliseconds
    	// console.log() prints its arguments, here we are printing the binlog
    	onMove: (state, binlog) => console.log(binlog.join("\n"))
    })
    
    if (winner == Role.Defender)
    	console.log("The defender won!")
    else
    	console.log("The attacker won!")
    
    /** @type {import("binmat/simulateGame").BrainScript} */
    function brain(context, args, xform) {
    	// you should fill this function with your brain code
    
    	// xform() is the equivalent of #fs.binmat.x()
    	xform({ op: "--" })
    }
    
  • Run node index.js

How to Build for Hackmud

  • Install Node.js, clone this repo, and open a command window in the newly cloned repo folder.
  • Run npm install.
  • Run npm run push-script.
    • This will print the number of characters needed to upload the script.
  • Open hackmud, pick a user, and run #up binmat.

Keywords

hackmud

FAQs

Package last updated on 21 Mar 2024

Did you know?

Socket

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.

Install

Related posts