Made some changes, it's fucked though, doesn't work for more than 2 players