From 42ea42565650ec734d0f244461de539d0436d2c4 Mon Sep 17 00:00:00 2001 From: 2ManyProjects Date: Sun, 9 Feb 2025 11:43:59 -0600 Subject: [PATCH] cleanup pre FEN generation --- Systems/Game/ChessGame.gd | 51 --------------------------------------- 1 file changed, 51 deletions(-) diff --git a/Systems/Game/ChessGame.gd b/Systems/Game/ChessGame.gd index ba6c096..6f4acc4 100644 --- a/Systems/Game/ChessGame.gd +++ b/Systems/Game/ChessGame.gd @@ -81,19 +81,6 @@ func initializeCardPreview() -> void: add_child(cardPreview) -# func initializeBoard() -> void: -# board = [] -# for i in range(boardXSize): -# var row = [] -# for j in range(boardYSize): -# row.append(null) -# board.append(row) -# createBoard() -# setupPieces() -# if !boardContainer.has_user_signal("tile_pressed"): -# boardContainer.add_user_signal("tile_pressed") -# if !boardContainer.has_user_signal("send_location"): -# boardContainer.add_user_signal("send_location") func initializeBoard() -> void: @@ -236,33 +223,6 @@ func updateTurnIndicator(): else: # Black's turn turnIndicator.color = Color(0, 0, 0, 1) # Black -func setupPieces() -> void: - # White pieces - placePiece("0-0", "Rook", 1) - placePiece("1-0", "Knight", 1) - placePiece("2-0", "Bishop", 1) - placePiece("3-0", "Queen", 1) - placePiece("4-0", "King", 1) - placePiece("5-0", "Bishop", 1) - placePiece("6-0", "Knight", 1) - placePiece("7-0", "Rook", 1) - - for x in range(boardXSize): - placePiece(str(x) + "-1", "Pawn", 1) - - # Black pieces - placePiece("0-7", "Rook", 0) - placePiece("1-7", "Knight", 0) - placePiece("2-7", "Bishop", 0) - placePiece("3-7", "Queen", 0) - placePiece("4-7", "King", 0) - placePiece("5-7", "Bishop", 0) - placePiece("6-7", "Knight", 0) - placePiece("7-7", "Rook", 0) - - for x in range(boardXSize): - placePiece(str(x) + "-6", "Pawn", 0) - func setupPiecesFromFEN() -> void: var fen_parts = FEN.split(" ") @@ -314,17 +274,6 @@ func placePiece(position: String, pieceName: String, color: int) -> void: var coords = position.split("-") board[int(coords[1])][int(coords[0])] = piece -# func placePiece(position: String, pieceName: String, color: int) -> void: -# var piece = summonPiece(pieceName, color) -# # boardContainer.get_node(position).add_child(piece) - -# var container = boardContainer.get_node(position) as PieceContainer -# await container.set_piece(piece, false) -# container.remove_piece(true) -# container.set_piece(piece, false) - -# var coords = position.split("-") -# board[int(coords[1])][int(coords[0])] = piece func summonPiece(pieceName: String, color: int) -> Node: var piece