What happens in a small scale blockchain network? My main question here is, is this understanding correct or have I misunderstood something? If this question would be better for Reddit then I apologise in advance and I'll move to there. Thanks.

Scenario:

So technically I could download the bitcoin source code and run my own altcoin (let's call it pokercoin) on a network of 5 computers (for me and my 4 geeky friends who wanted to play poker without chips).

If I'm understanding correctly, we would each be running pokercoin source code/qt on our laptops and no other computers would be needed to keep the thing running (or maybe we would need to run something else to ensure the network works, because otherwise there is no other way of the network doing all the IP level stuff? Or do nodes do this and run something other than the bitcoin source code?).

When I make a payment, each of the other 4 computers receives a copy of that transaction, and they all add this to a block of 1 transaction which gets appended to our very short blockchain after 10 minutes (because hypothetically my computer is able to solve in 10 mins).

If 2 of us made a transaction, (the new block to be added has 2 transactions), but the other 3 computers wrote their own block which diverged in truth to my computer and my friend's computer, then this 51 percent attack would beat the previous block to be appended (or is it added only after ANOTHER block is added (because this is now the longest chain).

We all also get new pokercoin for being miners in our own system (or maybe it is only those running different code who get to be miners).

Finally, none of us actually argues over having any money, because we know that 'how much we own' is actually only made up of the network iterating over every transaction that happened in order to calculate our amounts (and this happens every time a new block is made).

We also don't argue over block sizes, because there are 5 of us.
If you were using a fork of Bitcoin Core, your small scale network would not work.

Assuming you did the basic chain parameter modification or just firewall yourself from the rest of the Bitcoin network, there are two major things that are missing: peer discover, and mining.

Bitcoin Core by default uses a process called DNS Seeding in order to discover seed nodes. If those seeders fail, it will fall back to using some hard coded seed nodes. However, these are seed nodes which are treated differently than normal nodes (even though they are still normal nodes). Seed nodes are only connected to in order to get a list of more nodes to connect to. It is nodes on that list that are eventually connected to for actual normal node operations. Your node disconnects from those seed nodes once they get this list.

So, for your network, you would need to potentially run your own DNS seeders and seed nodes. But that's actually not really necessary. You would just need to disable DNS seeding and the hardcoded seed nodes, then just have everyone on your network set multiple connect=&lt;ip&gt; lines in their configuration files where &lt;ip&gt; is the IP address of a node. This will force the node to connect only to the specified nodes. Note that this will disable further node discovery and automatic node connection, so if you add someone else to your network, not all of the other nodes will connect to the newcomer unless they are explicitly added.

The other problem will be mining. Bitcoin Core does not contain any mining logic at all. It does not automatically mine nor does it even have the ability to produce blocks. Instead you will need to install some other mining software. However, because CPU and GPU mining are pointless, you will have to build, and potentially modify, those mining software yourself in order to enable CPU and GPU mining. Otherwise you will need to get some mining hardware supported by those software. Without using any mining software, your network will not produce any blocks and no transactions will be confirmed.