Giter Club home page Giter Club logo

server's Introduction

Brot-Server

LOC Go Version License

Description

This project contains a server program to emulate the official test environment found unter wss://msoll.de/spe_ed. It provides the standard WebSocket game API (/spe_ed) as well as the time API (/spe_ed_time). It creates a web server that hosts a GUI visualizing the game. The GUI can be accessed under http://localhost:8080.

The server supports one game at a time. It does not check the client's responses for timeouts. Therefore, it should only be used in development.

Installation

0. Prerequisites

Our software is written in Go. So you need a fully functional Go installation. At least version 1.15 is required. You can get information on how to install Go on your computer here.

This program also uses the gorilla/websocket library that can be found under https://github.com/gorilla/websocket.

To install the library, run go get github.com/gorilla/websocket after you installed Go.

1. Cloning the repository

To clone the repository run git clone https://github.com/TeamBrot/server.git. If you'd like to use the scripts we provide with our client, make sure to clone the repository into the same directory. To get into the repository run cd server

2. Building the server

Run go build at the root level of the repository. In case of failure make sure you are in the right directory and your Go installation works.

3. Running the server

Run ./server. The server is now waiting for connections. After the specified number of players connected, a game starts. You can stop the server by pressing Strg+c on your keyboard. For information about the options read the section Configuration.

If you are also setting up our client you can now jump back here.

Configuration

The server has several configuration options:

  • -h height: Board height
  • -w width: Board width
  • -p player: Number of players (up to 6)
  • -d minimalDeadline: Minimal deadline in seconds
  • -o deadlineOffset: Maximum deadline offset in seconds; maximum deadline is minimalDeadline + deadlineOffset. The deadline will be chosen at random.

server's People

Contributors

jacob271 avatar rgwohlbold avatar sohn123 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.