Git Product home page Git Product logo

bots-of-black-friday's Introduction

Bots of black friday

Shoppers' favorite sale is always the day after Thanksgiving sale, a.k.a. Black Friday.

Pelin kulku

  • Serveri lähettää botille pelitilan, johon botin on vastattava omalla siirrollaan, joka on liikkuminen (UP, DOWN, LEFT, RIGHT), esineen nostaminen (PICK) tai esineen käyttäminen (USE).
  • Virheellisistä siirroista (seinään juokseminen, olemattoman esineen hamuilu, siirron palauttamisessa viivästely, rajapintavirheet yms) botin kunto vähenee. Kuolleet botit poistetaan kaupasta vartijoiden toimesta.
  • Kaupan esineillä on hinta ja alennusprosentti. Mitä kovempi alennus, sitä kauemmin esineen nostamisessa kestää.
  • Botilla on tietty määrä rahaa, joka kuluu ostoksia tehdessä.
  • Mitä enemmän rahallista arvoa saa koottua pelin aikana, sitä korkeammalle pääsee top-listalla.
  • Koska Black Friday, osa esineistä on aseita, joita käyttämällä voi vahingoittaa lähintä kanssashoppailijaa.
  • Kun botilla ei ole enää varaa ostaa esineitä, on sen suunnattava pois kaupasta kassan kautta, jolloin peli päättyy sen osalta. Varastaminen on rangaistava teko, josta saa sakinhivutusta.
  • Kassalle ei kannata hortoilla kesken pelin, jos ei halua poistua ennenaikaisesti.
  • Kaupoissa voi olla seiniä, jotka hankaloittavat kulkua.

Rajapinta

  • Rajapinnan tietosisältö on nähtävissä esimerkkibotissa.

Esimerkkiviesti

Tilanne botin rekisteröityessä.


{
  "id": "d011658d-0d8e-4d37-820b-166f8959647d",
  "player": {
    "name": "ED-209",
    "url": "http://192.168.2.200:3002/round",
    "position": {
      "x": 88,
      "y": 25
    },
    "score": 0,
    "money": 5000,
    "state": "MOVE",
    "timeInState": 0,
    "usableItems": [],
    "actionCount": 0,
    "health": 100
  },
  "gameState": {
    "map": {
      "width": 92,
      "height": 28,
      "maxItemCount": 5,
      "tiles": [
        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "xx________________________________________________________________________________________xx",
        "xx________________________________________________________________________________________xx",
        "xx_______o_____________######################xx######################_____________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx_____________________######################xx######################_____________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx___________________________________________xx___________________________________________xx",
        "xx_____________________######################xx######################_____________________xx",
        "xx________________________________________________________________________________________xx",
        "xx________________________________________________________________________________________xx",
        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      ],
      "name": "citymarket",
      "exit": {
        "x": 9,
        "y": 4
      }
    },
    "players": [
      {
        "name": "ED-209",
        "url": "http://192.168.2.200:3002/round",
        "position": {
          "x": 88,
          "y": 25
        },
        "score": 0,
        "money": 5000,
        "state": "MOVE",
        "timeInState": 0,
        "usableItems": [],
        "actionCount": 0,
        "health": 100
      }
    ],
    "finishedPlayers": [
      {
        "name": "ED-209",
        "url": "http://localhost:3002/round",
        "position": {
          "x": 9,
          "y": 4
        },
        "score": 10370,
        "money": 773,
        "state": "MOVE",
        "timeInState": 0,
        "usableItems": [
          {
            "price": 2305,
            "discountPercent": 83,
            "position": {
              "x": 89,
              "y": 18
            },
            "type": "WEAPON",
            "isUsable": true
          },
          {
            "price": 3865,
            "discountPercent": 73,
            "position": {
              "x": 33,
              "y": 12
            },
            "type": "WEAPON",
            "isUsable": true
          }
        ],
        "actionCount": 181,
        "health": 80
      }
    ],
    "items": [
      {
        "price": 3864,
        "discountPercent": 35,
        "position": {
          "x": 27,
          "y": 10
        },
        "type": "JUST_SOME_JUNK",
        "isUsable": false
      },
      {
        "price": 2300,
        "discountPercent": 34,
        "position": {
          "x": 2,
          "y": 24
        },
        "type": "JUST_SOME_JUNK",
        "isUsable": false
      },
      {
        "price": 2994,
        "discountPercent": 20,
        "position": {
          "x": 80,
          "y": 17
        },
        "type": "JUST_SOME_JUNK",
        "isUsable": false
      },
      {
        "price": 1917,
        "discountPercent": 23,
        "position": {
          "x": 35,
          "y": 22
        },
        "type": "JUST_SOME_JUNK",
        "isUsable": false
      },
      {
        "price": 3886,
        "discountPercent": 26,
        "position": {
          "x": 36,
          "y": 22
        },
        "type": "JUST_SOME_JUNK",
        "isUsable": false
      }
    ],
    "round": 111825,
    "shootingLines": []
  }
}

Frontti

  • npm install
  • npm run-script watch

bots-of-black-friday's People

Contributors

janneri avatar ruoat avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.