Hello there, I'm trying to make a game that is a combination of tic-tac-toe and checkers, looks like this:
(BTW it's not homework, is just a project).
1__2___3
|_/_|_\_|
4---5----6
|_\_|_/_|
7---8---9
(there is already a game like this but i couldn'd fint images of it).
On the first part of the code (I wrote comments on it so it will be easier), is the place where both; Player 1 and 2 get their 3 tokens on the board, yeah just 3, and on part 2 is the part supposed to let the Player 1, for now, move one of the tokens to a free space; but it doesn't work well, I made it with "if" loops but in some cases it does works but on the mayotity makes things that it weren't even supposed to happen.
Example:
x__o___-
|_/_|_\_|
-----o----x
|_\_|_/_|
o---------x
(Player 1 x
Palyer 2 o
-Player 1 tries to move the token on the right up corner to a spot
down, it deletes one of the "o"s and duplicates the "x".
I'll really be thanked if anyone could help me with this. Here's the code.
The code is too long so I can't post it here, thats why I uploaded it here
https://docs.google.com/document/d/1YfHsGb-38YMVhE5Ne2BC-wiAWJMHxeaWgP7e5E13nFA/pub