func: function payPlayers() private {
          
          require(calculationsDone);
  
          
          if (now <= PAYMENTS_END_TIME) {
              
              Player storage player = players[msg.sender];
  
              
              if (player.winnings > 0 && player.payed == 0) {
                  
                  uint256 winCommission = player.winnings.mul(WINNINGS_COMMISSION).div(PERCENTS_DIVIDER);
  
                  
                  uint256 notWonTickets = player.ticketsCount.sub(player.wonTicketsCount);
                  
                  uint256 notWonAmount = notWonTickets.mul(participantsTicketPrize);
  
                  
                  player.payed = player.winnings.add(notWonAmount);
  
                  
                  msg.sender.send(player.winnings.sub(winCommission).add(notWonAmount).add(msg.value));
  
                  
                  COMMISSION_ADDRESS.send(winCommission);
              }
  
              
              if (player.winnings == 0 && player.payed == 0) {
                  
                  uint256 returnAmount = player.ticketsCount.mul(participantsTicketPrize);
  
                  
                  player.payed = returnAmount;
  
                  
                  msg.sender.send(returnAmount.add(msg.value));
              }
          
          } else {
              
              uint256 contractBalance = address(this).balance;
  
              
              if (contractBalance > 0) {
                  
                  COMMISSION_ADDRESS.send(contractBalance);
              }
          }
      }