Skip to content

thespielplatz/LetterBots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Bot's playing the the Game Love Letter and the result is exported into a json file.

See game here: BoardGameGeek

Run a simulation:

    npm play

View the last game on localhost:3000. Run:

    npm view

If you want to create your own bot, create a new Brain:

// MyBrain.js
class MyBrain extends Brain {
    process(me, others, hand, turns) {
        // Put your code in here.
        // Maybe start with the "OreganoBrain" in Brain.js. It has already a lot of the
        // ruleset of the game implemented.
    
        return {
            card: 1,
            on: 0,
            has: 8
        }
    }
}

and put it into a player

// index.js
const myBrain = new MyBrain();
const p4 = new Player("MyPlayer", myBrain, gen);
dealer.addPlayer(p4);

Todos

  • Write & load Replay into a DB

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published