mirror of
https://github.com/kristoferssolo/2048.git
synced 2025-10-21 15:20:35 +00:00
feat(game): add method templates
This commit is contained in:
parent
6af96454bd
commit
5513be4eb5
@ -1,7 +1,7 @@
|
|||||||
import random
|
import random
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from utils import Config
|
from utils import Config, Direction
|
||||||
|
|
||||||
|
|
||||||
class Game2048:
|
class Game2048:
|
||||||
@ -21,3 +21,12 @@ class Game2048:
|
|||||||
self.board[row, col] = random.choices(
|
self.board[row, col] = random.choices(
|
||||||
[2, 4], weights=Config.tile.probability
|
[2, 4], weights=Config.tile.probability
|
||||||
)[0]
|
)[0]
|
||||||
|
|
||||||
|
def move(self, direction: Direction) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def merge(self, row: np.ndarray) -> np.ndarray:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def display(self) -> None:
|
||||||
|
pass
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user