fabienjuif / subterra

Not finished clone of subterra board game
https://pedantic-lalande-d5e881.netlify.com/
0 stars 0 forks source link

online / choose a game set #98

Open fabienjuif opened 4 years ago

fabienjuif commented 4 years ago

A game set is a set of predefined cards and tiles. A set can be "seeded" in which case the random is the same.

Exemple of sets :

Name: Subterra medium set #1
Ideal for: 2 players
Seed: <input, default: Euie8>
Description: Terraria cards and tiles for 2 players
Name: Deep dark, you will die
Ideal for: 4 players
Seed: <input, default: On2AD8>
Description: There is SO MUCH tiles to dig before finding the escape!
fabienjuif commented 4 years ago

https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript

fabienjuif commented 4 years ago

https://github.com/davidbau/seedrandom

fabienjuif commented 4 years ago

With the previous lib a linked above I think we can lighten the state :) (by not storing all dices)

  1. A player can choose a game set
  2. Then modify the master seed
  3. Then override the dices seed if he wants, by default the dices seed is generated from the master seed
fabienjuif commented 4 years ago

terraria base 1 for 2 player
  landslide
  water
  gaz

Set: Terraria
Seed master: <> | 
  Seed dices: <> | 
  Seed cards: <> | 
  Seed tiles: <> | 

@cards>init
  endAtTurn: 2,
  availabilities: [
    {
      type: 'landslide',
      max: Infinity,
   },
    {
      type: 'water',
      max: 2,
    },
        {
      type: 'gaz',
      max 2,
    }
  ]

@cards>init
  [landslide, gaz, water]

landslide,