function StartNewMiner() public
    {
        require(miners[msg.sender].lastUpdateTime == 0);
        
        miners[msg.sender].lastUpdateTime = block.timestamp;
        miners[msg.sender].money = 0;
        miners[msg.sender].rigs[0] = 1;
        miners[msg.sender].unclaimedPot = 0;
        miners[msg.sender].lastPotShare = 0;
        
        pvpMap[msg.sender].troops[0] = 0;
        pvpMap[msg.sender].troops[1] = 0;
        pvpMap[msg.sender].troops[2] = 0;
        pvpMap[msg.sender].troops[3] = 0;
        pvpMap[msg.sender].troops[4] = 0;
        pvpMap[msg.sender].troops[5] = 0;
        pvpMap[msg.sender].immunityTime = block.timestamp + 28800;
        pvpMap[msg.sender].exhaustTime  = block.timestamp;
        
        indexes[topindex] = msg.sender;
        ++topindex;
    }