<commit_before>from chess.pieces.color import Color
from chess.pieces.piece import Piece

class Rook(Piece):
    def render(self):
        if self.color == Color.white:
            return 'R'
        else:
            return 'r'

<commit_msg>Rook movement<commit_after>from chess.pieces.color import Color
from chess.pieces.piece import Piece

class Rook(Piece):
    def render(self):
        if self.color == Color.white:
            return 'R'
        else:
            return 'r'

    def validMove(self, position):
        # Check for horizontal and vertical movement
        if ((abs(position.x - self.position.x) > 0 and (position.y - self.position.y == 0)) or
            (abs(position.y - self.position.y) > 0 and (position.x - self.position.x == 0))):

            return True

        return False

{'fraction_non_alphanumeric': 0.10891089108910891, 'fraction_numerical': 0.0049504950495049506, 'mean_word_length': 2.16015625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '72405', 'n_tokens_mistral': 251, 'n_tokens_neox': 235, 'n_words': 70}