Coverage for grid_2048.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Create a new game grid :param n: (int) the size of the grid nxn :return: (list) the grid as a list of lists """ # Grid of size n x n
""" Create a new game grid with two tiles :param n: (int) the size of the grid nxn :return: (list) the game grid as a list of lists """
""" Add a new tile in the grid game at a free position :param grid: (list) the game grid :return: (list) the game grid """
""" Return the set of all tiles of a grid in a single list :param grid: (list) the game grid :return: (list) a list with the values of the tiles of the game_grid. If the position is free, the 0 value is returned """
""" Get the value 2 or 4 randomly with 90% of chance for 2 :return: (int ) tile value between 2 or 4 """
""" Returns the value of the grid in coordinate (x,y) :param grid: (list)the grid game :param x: (int) the first coordinate :param y: (int) the second coordiate :return: (int) the value of the tile in (x,y). If there is no tile, return 0 """
""" Return a list of tuples of coordinates of the empty tiles :param grid: (list) the game grid :return: (list of tuples) the list of tuple coordinates """
""" Return the coordinate of a free position for a new tile in the grid :param grid: (list) the game grid :return: (tuple) the coordinate for the new tile """
|