Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
bin
 
 
 
 
db
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
tmp
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

PitbossStats

Usage

Web app

Game setup

host game:
event_store = Rails.configuration.event_store
service = Game::Service.new(event_store)
game_id = SecureRandom.uuid
host_game_command = Game::HostGame.new(game_id, 24.hours)
service.host_game(host_game_command)
rename game and add slack data:
game_read_model = ReadModel::GameReadModel.find(game_id)
game_read_model.name = "arkency2"
game_read_model.slack_token = "your-token"
game_read_model.slack_channel = "your-game-channel"
game_read_model.ip_address = "your-game-ip-address"
game_read_model.save
create players
Player.create!(steam_name: "swistak35", slack_name: "swistak")
Player.create!(steam_name: "jura55", slack_name: "jorgen")
Player.create!(steam_name: "halkye", slack_name: "halki")
Player.create!(steam_name: "The Rubyist", slack_name: "pkondzior")
register players in correct order
["halkye", "tango_mig", "pan_sarin", "swistak35", "The Rubyist", "jura55", "jamesworthy", "dysk"].each_with_index do |steam_name, index|
  player = Player.find_by(steam_name: steam_name)
  command = Game::RegisterPlayer.new(game_id, player.id, index)
  service.register_player(command)
end
unregister players in case they are no longer playing
event_store = Rails.configuration.event_store
service = Game::Service.new(event_store)
command = Game::UnregisterPlayer.new("189e3f21-27c7-431b-9025-1feb92697635", Player.find_by(steam_name: "halkye").id, 2)
service.unregister_player(command)

Game server

change game config to enabled logging

download parser:

and place in Logs directory

make sure you have ruby installed

You can use Ruby installer

run from command line

ruby pbs3.rb [game_uuid] [players_count]

in case of game crash use

Afer crash script

to reset current turn, turn time and players end turn status

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.