How to calculate which side serves table tennis in the game?

1. Generally, the opening of a singles match is decided by drawing lots. Each player serves two balls and rotates until the end of the match. At the beginning of the next game, the opponent who started from the previous game serves, with two balls for each person, and rotates the service to the end of the game;

2. In doubles, the starting point is to draw lots to decide the server, with two balls for each team. After the starter serves, the opposing diagonal player serves, the server exchanges left and right positions with the opposing friend, and the opposing friend receives the service. After the opponent serves, the position of the server and the opponent remains unchanged. The other team serves, and the other two change places and change people to receive the service.