function getAllGames(bool onlyPlaying,uint256 from, uint256 to)public view returns(string gameInfoList){
        gameInfoList = "";
        uint256 counter = 0;
        for(uint256 i=0; i<gameIdList.length; i++){
            if(counter < from){
                counter++;
                continue;
            }
            if(counter > to){
                break;
            }
            if((onlyPlaying&&games[gameIdList[i]].status == STATUS.PLAYING && timenow() < games[gameIdList[i]].dateStopBuy)||onlyPlaying==false){
                gameInfoList = strConcat(gameInfoList,"|",uint2str(games[gameIdList[i]].id));
                gameInfoList = strConcat(gameInfoList,",",games[gameIdList[i]].name);
                gameInfoList = strConcat(gameInfoList,",",uint2str(games[gameIdList[i]].totalPot));
                gameInfoList = strConcat(gameInfoList,",",uint2str(games[gameIdList[i]].dateStopBuy));
                if(games[gameIdList[i]].status == STATUS.PLAYING && timenow() > games[gameIdList[i]].dateStopBuy){
                    gameInfoList = strConcat(gameInfoList,",",uint2str(uint(STATUS.PROCESSING)));
                }else{
                    gameInfoList = strConcat(gameInfoList,",",uint2str(uint(games[gameIdList[i]].status)));
                }
                counter++;
            }
        }
    }