Connect two devices to play together

Hey there,
I am planning to start a new project. For this I think about to connect two devices wich can communicate.
The problem is, that I don’t have any idea at the moment.
Do you have some ideas or do you use some techniques in your project for this.
As example, how does it works, when there are two devices who are playing sink ships against each other? :speak_no_evil:
Thanks for replys and ideas :slight_smile: