Browse Source

mieux gérer le hasard pour les couleurs de bloc header

master
MEUNIER Thibaud 7 years ago
parent
commit
ab2d7de654
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      blockchain/inc/block.php
  2. +1
    -1
      methode/hashes/robot.sh
  3. +1
    -1
      methode/hashes2hashes/robot.php

+ 1
- 1
blockchain/inc/block.php View File

@ -268,7 +268,7 @@ class blockchain
];
$color = $couleur;
if ($color == -1) $color = rand(0,count($color_tab)-1);
if (($color == -1) || ($color > (count($color_tab)-1))) $color = rand(0,count($color_tab)-1);
// Rajout des HASHES
$white = imagecolorallocate($vImage, 254, 254, 254);

+ 1
- 1
methode/hashes/robot.sh View File

@ -15,7 +15,7 @@ for BLOCK in `awk '{print $2}' $DATA_PATH/block_list.txt`
do
if [ ! -f $DATA_PATH/$METHODE/$BLOCK.png ]
then
php robot.php $BLOCK $((RANDOM % 6))
php robot.php $BLOCK 99999
fi
done

+ 1
- 1
methode/hashes2hashes/robot.php View File

@ -53,7 +53,7 @@ for($i=0; $i<$nb_max; $i++)
$block_hash = $the_block->prev_block;
$hash=DATA_PATH.'/hashes/'.$the_block->hash.'.png';
if ($final_hash == 'default') $final_hash = $hash;
if ($final_hash == 'default') $final_hash = $the_block->hash;
if (file_exists($hash))
{

Loading…
Cancel
Save