Giter VIP home page Giter VIP logo

asteroid_backend's Introduction

Asteroid_backend

Asteroid 客户端

开始使用

git clone https://github.com/wuhan005/Asteroid_backend
go mod tidy
go build -o Asteroid

创建team.txt文件,队伍名一行一个。

运行:

./Asteroid
  • --port HTTP 监听端口(默认:12345)
  • --token HTTP Authorization 请求头(默认随机字符串)

接口

  • Request Header:
Authorization: YOUR_TOKEN_HERE

/websocket Unity WebSocket 连接地址

POST /attack 攻击特效

{
  "From": 1,
  "To": 2
}

POST /rank 设置排行

{
  "Team": [
    {
      "Id": 0,
      "Rank": 1,
      "Score": 1000
    },
    {
      "Id": 1,
      "Rank": 2,
      "Score": 900
    }
  ]
}

POST /status 队伍状态

{
  "Id": 0,
  "Status": "attacked"
}
  • attacked 被攻击
  • down 被 Check Down

POST /round 设置轮数

{
  "Round": 47
}

GET /easterEgg 陨石彩蛋动画

POST /round 设置轮数

{
  "Time": 300
}

单位:秒(s)

POST /clear 清除队伍状态

{
  "Id": 0
}

POST /clearAll 清除所有队伍状态

LICENSE

Apache License 2.0

asteroid_backend's People

Contributors

wuhan005 avatar

Stargazers

 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.