Untitled - MARKUP 0.86 KB
                    
             # sprawdzenie poziomu

if [ ${tab[0]} == ${tab[1]} && ${tab[1]} == ${tab[2]} ]
then
	end="T"
fi

if [ ${tab[3]} == ${tab[4]} && ${tab[4]} == ${tab[5]} ]
then
	end="T"
fi

if [ ${tab[6]} == ${tab[7]} && ${tab[7]} == ${tab[8]} ]
then
	end="T"
fi

# Sprawdzenie pionu

if [ ${tab[0]} == ${tab[3]} && ${tab[3]} == ${tab[6]} ]
then
	end="T"
fi

if [ ${tab[1]} == ${tab[4]} && ${tab[4]} == ${tab[7]} ]
then
	end="T"
fi

if [ ${tab[2]} == ${tab[5]} && ${tab[5]} == ${tab[8]} ]
then
	end="T"
fi

# sprawdzenie skosow
012
345
678

if [ ${tab[0]} == ${tab[4]} && ${tab[4]} == ${tab[8]} ]
then
	end="T"
fi

if [ ${tab[2]} == ${tab[4]} && ${tab[4]} == ${tab[6]} ]
then
	end="T"
fi
            
            

Paste Hosted With By Wklejamy.pl