Code Monkey home page Code Monkey logo

Comments (6)

Heroyt avatar Heroyt commented on June 8, 2024

@Kapustaa Can you please provide your code example to replicate this issue?

from tournament-generator.

Kapustaa avatar Kapustaa commented on June 8, 2024

`<?php
require 'vendor/autoload.php';

// Create a tournament
$tournament = new TournamentGenerator\Preset\SingleElimination('Tournament name');

// Set tournament lengths - could be omitted
$tournament
->setPlay(7) // SET GAME TIME TO 7 MINUTES
->setGameWait(2) // SET TIME BETWEEN GAMES TO 2 MINUTES
->setRoundWait(0); // SET TIME BETWEEN ROUNDS TO 0 MINUTES

// CREATE 6 TEAMS
for ($i = 1; $i <= 6; $i++) {
$tournament->team('Team ' . $i);
}

// GENERATE ALL GAMES
$tournament->generate();

// Simulate games
$tournament->genGamesSimulate(); // Simulate only games for example to only save bracket to DB
$tournament->genGamesSimulateReal(); // Simulate games with results like a real tournament

// GET ALL TEAMS
$teams = $tournament->getTeams(true); // TRUE to get teams ordered by their results`

from tournament-generator.

Heroyt avatar Heroyt commented on June 8, 2024

I have tried this example, but I cannot replicate this error. Is there something else you do with it? What version of the library / PHP are you using?

from tournament-generator.

Kapustaa avatar Kapustaa commented on June 8, 2024

Got php 7.3.31

from tournament-generator.

Heroyt avatar Heroyt commented on June 8, 2024

That version is no longer supported. I would recommend for you to upgrade to at least PHP 7.4 and download the latest version of the library.

from tournament-generator.

Kapustaa avatar Kapustaa commented on June 8, 2024

It's working now, thanks

from tournament-generator.

Related Issues (7)

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.