Games\Empires\Game.js
GamesByEmail
Object
All Implemented Interfaces:
GamesByEmail.EmpiresBitArray
implementsFoundation.Class
Constructor Summary |
// parentClass
// null, // implement class (like interface I guess)
//class contructor
|
Field Summary | |
static | b64Chars
// Position 0-63 is code for characters
|
Method Summary | |
static |
|
static |
// 01234567890123456789012345678901234567890123456789012345678901234
// The equal sign is just extra :)
|
|
//ASVPPPPPPPPPQFL
//012345678901234
// iPos=3.
// 12 ... 12-3=9.
|
|
|
|
// returns an int as 0 or 1
|
|
|
|
//Count how many chars sData represents, accounting for Run-Length encoding.
|
static |
//static methods
|
|
//private
|
|
|
|
|
|
//class methods
//set a bit to zero or 1.
|
|
// Assume bitArray stores packed integers, lowest order bits
// closest to 0 index. higher order bits get bigger as bitArray index grows
// eg: 11 as binary is: 1011.
// Suppose iStartBitPos is 3 of an 16 bit array
// hi-end of array -> 00000000 01011000 <-0th index
// | |
|
|
|
|
//Preconditions: sRleBase64Data does not use padding.
// It is either base64 data, or base64 data with run-length
// encoded data. eg: SDF.ARgsd .AR is a run. the period is
// a marker. A is the character to repeat. R is base64 encoded number
// add 3 to R to get number of times to repeat the run. (map 4 to 0)
|
|
//returns base64 encoded string
//bOptSkipPadding: set to true to omit trailing equal sign padding.
// default is false.
|
|
//returns entire array as a string.
|
|
// Convert bits to base64 data, but wherever a run of 4 or more identical
// base64 chars are found, encode them as
|
|
//returns entire array as a string. Adds a space every 8bits
|
Methods inherited from Foundation.Class |
getTypePath , isInstanceOf |
Constructor Detail |
GamesByEmail.EmpiresBitArray()
// parentClass // null, // implement class (like interface I guess) //class contructor
Field Detail |
static b64Chars
// Position 0-63 is code for characters
Method Detail |
static b64decode(sChar)
sChar -
static b64encode()
// 01234567890123456789012345678901234567890123456789012345678901234 // The equal sign is just extra :)
countRun()
//ASVPPPPPPPPPQFL //012345678901234 // iPos=3. // 12 ... 12-3=9.
dispose()
dispose
in class Class
getBit()
// returns an int as 0 or 1
getBitsAsInt(iStartBitPos,
numBitsToUse)
iStartBitPos -
numBitsToUse -
getRunLengthDecodedBase64Length()
//Count how many chars sData represents, accounting for Run-Length encoding.
static leftShift()
//static methods
pGetCharOffset()
//private
reset()
setBase64(sBase64Data)
sBase64Data -
setBit()
//class methods //set a bit to zero or 1.
setBitsToInt()
// Assume bitArray stores packed integers, lowest order bits // closest to 0 index. higher order bits get bigger as bitArray index grows // eg: 11 as binary is: 1011. // Suppose iStartBitPos is 3 of an 16 bit array // hi-end of array -> 00000000 01011000 <-0th index // | |
setCompactString(sEncodedString,
/*opt*/)
sEncodedString -
/*opt*/ -iToCharOffset
setRleBase64()
//Preconditions: sRleBase64Data does not use padding. // It is either base64 data, or base64 data with run-length // encoded data. eg: SDF.ARgsd .AR is a run. the period is // a marker. A is the character to repeat. R is base64 encoded number // add 3 to R to get number of times to repeat the run. (map 4 to 0)
toBase64()
//returns base64 encoded string //bOptSkipPadding: set to true to omit trailing equal sign padding. // default is false.
toCompactString()
//returns entire array as a string.
toRleBase64()
// Convert bits to base64 data, but wherever a run of 4 or more identical
// base64 chars are found, encode them as
toString()
//returns entire array as a string. Adds a space every 8bits
Overrides:toString
in class Class