private GameCell GetMoveInDirection(Vector2 currentPosition) { GameCell move = GetMove(currentPosition, direction); if (move != null && move.IsEmpty()) { return(move); } // switch to oposite direction this.direction = GetOpositeDirection(direction); move = GetMove(currentPosition, direction); if (move != null && move.IsEmpty()) { return(move); } return(null); }