cleanup pre FEN generation
This commit is contained in:
parent
2a48655766
commit
42ea425656
1 changed files with 0 additions and 51 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue