Is there a way to algorithmically ensure that players cannot alter the game state to their will or is it just not possible to do this in p2p structure.
Actually, this is a well studied problem within cryptography; it is known as Mental Poker. The question was "is there a way that a set of parties could play poker just by passing messages without a trusted third party", and the answer is "yes" (however it is rather nontrivial). And, while might sound like that is a rather obscure problem, it turned out that this research was the starting point for Secure Multiparty Computation (which is not at all obscure).
To start with, you might want to look at the Wikipedia article on Mental Poker; it is certainly not sufficient for you to implement it, but it would give you the basics (and has pointers to papers that go into more depth). Now, it may very well be that implementing this is more complex than you care to do at this moment, but this shows that it is possible.
On the other hand, there is one possible cheat that cryptography may not be able to address; a set of players may cooperate (show each other their cards by exchanging messages privately), and collude against another player. In the most extreme case, if there are 10 players (who get 5 cards each), then the 9 colluding players will be able to deduce that the last player's hand will be 5 cards out of a specific set of 7; that is, one of 21 specific hands. I would expect that would give them a significant advantage. A similar (if weaker) advantage would likely occur in less extreme scenarios.