changing of game logic and...

fix bug in Matrix.equals() when Matrix object compare with different
class object or with other Matrix that contains null elements