I'm not sure if this requires an algorithm. Since this is a round robin with a fixed number of teams and games, you can simply set up a schedule (the same on both ships).
Let me explain and say if you need anything else.
There will be 15 games, each team will play with each other so that each team plays 5 games. You can start the tournament by playing 5 sets of 3 games, where each team plays once in each set.
Example:
1-2
3-4
5-6
1-3
2-5
4-6
3-5
1-4
2-6
1-5
2-4
3-6
4-5
1-6
2-3
, , - 4 (2 ).
. .
7,5 , 8 4 .
. . , , 3- , 4, . ( 3 3 4). , , , , , .