PHP Classes

File: implementations/2Moons/1_6_1_injectionmode/

Recommend this page to a friend!
  Classes of Nicola Covolo  >  OPBE  >  implementations/2Moons/1_6_1_injectionmode/  >  Download  
File: implementations/2Moons/1_6_1_injectionmode/
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: OPBE
Ogame probabilistic battle engine
Author: By
Last change:
Date: 3 years ago
Size: 1,383 bytes


Class file image Download
## InjectionMode
Default installatin mode move your implementation file to replace old calculateAttack.    
However, in this way, your project has 2 same files and expecially each time OPBE lib is updated you need to copy that implementation.     
Instead, using injectionMode the only used OPBE's implementation stay inside OPBE.  

## Installation

1. Download and upload all [OPBE files]( where you prefer.   
   For example,if you upload to *ROOT_PATH/includes/libs/*, you should see something like *ROOT_PATH/includes/libs/opbe/index.php*.  
   (Remember to rename opbe-master to opbe)   
   Alternatively, you can open a terminal and do:

    cd ROOT_PATH/includes/libs/
    sudo git clone

2. Replace all code inside *ROOT_PATH/includes/classes/missions/calculateAttack.php* with:
        require_once( ROOT_PATH . 'includes'.DIRECTORY_SEPARATOR.'libs'.DIRECTORY_SEPARATOR.'opbe'.DIRECTORY_SEPARATOR.'implementations'.DIRECTORY_SEPARATOR.'2Moons'.DIRECTORY_SEPARATOR.'1_6_1_injectionmode'.DIRECTORY_SEPARATOR.'calculateAttack.php' );
3. Updating:
    You can use filezilla to upload opbe lib.   
    Alternatively, you can open a terminal and do:
    cd ROOT_PATH/includes/libs/opbe
    sudo git pull