How to make connect 4 in python
I'm really curious how to make the game connect 4 in python. if someone can help me with it (because i get stuck at the first minute) then I would be really happy. :)
I'm really curious how to make the game connect 4 in python. if someone can help me with it (because i get stuck at the first minute) then I would be really happy. :)
I think if you don't want to use the turtle or something else then maybe you make a board out of 0s and the user could enter a number and it would change to a 1. Then the computer would randomly geanortater a number and it would be 3.
If this helped please mark it as an answer.
@lightningrock i now made a code of it. the only problem i face now is that it only gives the win to a player when he has 4 in a row (in a 4x4 grid) or 5 in a row (in a 5x5 grid) and so on. how can i code it that it only has to be 4 in a row no matter the size of the grid.
can u invite me to the repl?
@larsjansen1
@lightningrock https://repl.it/join/yeglhihk-larsjansen1
ok i joined @larsjansen1
@lightningrock thats nice! Can you let me know when you tried to fix it?
ok sure @larsjansen1
i'm not rly good at python im a beginner but um.. maybe this will help https://repl.it/@lightningrock/ContentIntelligentIntercept
(note:the code is not fully written by me and in your code the prompts are a little hard to understand)
@larsjansen1