Skip to content

eridal/Vindinium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vindinium

Four legendary heroes were fighting for the land of Vindinium Making their way in the dangerous woods Slashing goblins and stealing gold mines And looking for a tavern where to drink their gold

Vindinium is an Artificial Intelligence programming challenge. You have to take the control of a legendary hero using the programming language of your choice. You will fight with other AI for a predetermined number of turns and the hero with the greatest amount of gold will win.

Install and Run

Download and install using Composer

  1. Install Composer:

    curl -s https://getcomposer.org/installer | php
  2. Add Vindinium as a dependency to your composer.json

    {
        "require": {
            "eridal/vindinium": "master-dev"
        }
    }
  3. Install

    php composer.phar install
    
  4. Execute your Robot

    php vendor/bin/vindinium.php path/to/RobotClass.php
    

Robots

  1. Register your robot at vindinium.

    Tip: Use one key per robot, or stats will be shared.

  2. Create a class, and implement the Robot interface

Getting Started

/**
 * This hero will randomly move
 */
class Random implements \Vindinium\Robot {

    /**
     * Robots's secret key.
     *
     * Secret as in "Keep. It. Secret."
     *
     * @return string
     */
    function secretKey() {
        return "<your-secret-key-here>";
    }

    /**
     * Your robot logic goes here
     *
     * On each turn this method will be called with the game `$state`
     * for you to decide what to do next.
     */
    function play(\Vindinium\State $state, \Vindinium\Move $to) {
        $to->random();
    }
}

Feedback

Yes, please!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages