This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* player defination ... */ | |
var Players = { | |
Sunyanzi : { HP:100, ATT:20, DEF:5 }, | |
ikaros : { HP:100, ATT:15, DEF:5 } | |
}; | |
/* initialize battle field ... */ | |
var queue = []; | |
/* decide fighting order ... */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function encrypt( $source, $key ) { | |
/* calculate padding ... */ | |
$pad = 8 - ( strlen( $source ) % 8 ); | |
/* encrypt using MCrypt ... */ | |
return base64_encode( mcrypt_encrypt( | |
MCRYPT_DES ,$key, $source . str_repeat( chr( $pad ), $pad ), | |
MCRYPT_MODE_CBC, pack( |