This commit is contained in:
2ManyProjects 2025-01-24 20:06:23 -06:00
commit c1a6a06dd3
49 changed files with 1875 additions and 0 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
/android/

BIN
Chess.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

34
Chess.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bphl4a8t8l0h7"
path="res://.godot/imported/Chess.png-5aa5e1cd7f41db7e12bcda3ac0b5924e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Chess.png"
dest_files=["res://.godot/imported/Chess.png-5aa5e1cd7f41db7e12bcda3ac0b5924e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

31
Diagrams/Game Machine.mmd Normal file
View file

@ -0,0 +1,31 @@
---
config:
theme: forest
---
stateDiagram
[*] --> GameSetup
GameSetup --> WhiteTurn
state TurnPhases {
WhiteTurn --> HandSetup
BlackTurn --> HandSetup
HandSetup --> ResolvePersistentEffects : Draw Cards
ResolvePersistentEffects --> ApplyTileEffects
ApplyTileEffects --> AttachCards
AttachCards --> ApplyCardEffects
ApplyCardEffects --> Movement
Movement --> EvaluatePosition
state EvaluatePosition {
[*] --> CheckStatus
CheckStatus --> Checkmate : In Checkmate
CheckStatus --> Draw : In Draw
CheckStatus --> ValidMove : Game Continues
ValidMove --> SpecialMoves
SpecialMoves --> [*]
}
EvaluatePosition --> WhiteTurn : White's Turn
EvaluatePosition --> BlackTurn : Black's Turn
EvaluatePosition --> RoundEnd : Game Over
}
RoundEnd --> ShopPhase
ShopPhase --> GameSetup : Next Round
RoundEnd --> [*] : End Game

214
Game.gd Normal file
View file

@ -0,0 +1,214 @@
extends Control
const CardDisplay = preload("res://Systems/CardDisplay.gd")
var Selected_Node = ""
var Turn = 0
var Location_X = ""
var Location_Y = ""
var turn_indicator: ColorRect
var p1String: RichTextLabel
var p2String: RichTextLabel
var p1Points = 0
var p2Points = 0
var pos = Vector2(25, 25)
var Areas: PackedStringArray
# this is seperate the Areas for special circumstances, like castling.
var Special_Area: PackedStringArray
var light_style = StyleBoxFlat.new()
var dark_style = StyleBoxFlat.new()
var highlight_style = StyleBoxFlat.new()
var deck_manager: DeckManager
var card_display: CardDisplay
var has_moved = false # Track if piece has moved this turn
var currently_moving_piece = null
func _ready():
deck_manager = DeckManager.new()
card_display = CardDisplay.new()
add_child(deck_manager)
add_child(card_display)
card_display.update_hand(deck_manager.hand)
deck_manager.connect("hand_updated", func(hand): card_display.update_hand(hand))
light_style.bg_color = Color(0.8, 0.8, 0.8, 1)
dark_style.bg_color = Color(0.2, 0.2, 0.2, 1)
highlight_style.bg_color = Color(0, 0.3, 0, 1)
# Get reference to the turn indicator
turn_indicator = $TurnIndicator
p1String = $Player1Points
p2String = $Player2Points
p1String.text = "0"
p2String.text = "0"
# Set initial color for white's turn
update_turn_indicator()
func update_turn_indicator():
if Turn == 0: # White's turn
turn_indicator.color = Color(1, 1, 1, 1) # White
else: # Black's turn
turn_indicator.color = Color(0, 0, 0, 1) # Black
func reset_highlights():
var Flow = get_node("Flow")
for button in Flow.get_children():
var coord = button.name.split("-")
var isWhiteSquare = (int(coord[0]) + int(coord[1])) % 2 == 0
if isWhiteSquare:
button.add_theme_stylebox_override("normal", light_style)
else:
button.add_theme_stylebox_override("normal", dark_style)
func _on_flow_send_location(location: String):
if Selected_Node != "" && Selected_Node == location:
reset_highlights()
Selected_Node = ""
return
# variables for later
var number = 0
Location_X = ""
var node = get_node("Flow/" + location)
# This is to try and grab the X and Y coordinates from the board
while location.substr(number, 1) != "-":
Location_X += location.substr(number, 1)
number += 1
Location_Y = location.substr(number + 1)
# Now... we need to figure out how to select the pieces. If there is a valid move, do stuff.
# If we re-select, just go to that other piece
if Selected_Node == "" && node.get_child_count() != 0 && node.get_child(0).Item_Color == Turn:
Selected_Node = location
Get_Moveable_Areas()
elif Selected_Node != "" && node.get_child_count() != 0 && node.get_child(0).Item_Color == Turn && node.get_child(0).name == "Rook":
# Castling
for i in Areas:
if i == node.name:
var king = get_node("Flow/" + Selected_Node).get_child(0)
var rook = node.get_child(0)
# Using a seperate array because Areas wouldn't be really consistant...
king.reparent(get_node("Flow/" + Special_Area[1]))
rook.reparent(get_node("Flow/" + Special_Area[0]))
king.position = pos
rook.position = pos
# We have to get the parent because it will break lmao.
Update_Game(king.get_parent())
# En Passant
elif Selected_Node != "" && node.get_child_count() != 0 && node.get_child(0).Item_Color != Turn && node.get_child(0).name == "Pawn" && Special_Area.size() != 0 && Special_Area[0] == node.name && node.get_child(0).get("En_Passant") == true:
for i in Special_Area:
if i == node.name:
var pawn = get_node("Flow/" + Selected_Node).get_child(0)
node.get_child(0).free()
pawn.reparent(get_node("Flow/" + Special_Area[1]))
pawn.position = pos
Update_Game(pawn.get_parent())
elif Selected_Node != "" && node.get_child_count() != 0 && node.get_child(0).Item_Color == Turn:
# Re-select
Selected_Node = location
Get_Moveable_Areas()
elif Selected_Node != "" && node.get_child_count() != 0 && node.get_child(0).Item_Color != Turn:
# Taking over a piece
for i in Areas:
if i == node.name:
var Piece = get_node("Flow/" + Selected_Node).get_child(0)
var captured_piece = node.get_child(0)
# Add points to the capturing player
if Turn == 0: # White's turn
p1Points += captured_piece.Points
p1String.text = str(p1Points)
else: # Black's turn
p2Points += captured_piece.Points
p2String.text = str(p2Points)
# Win conditions
if captured_piece.name == "King":
print("Damn, you win!")
node.get_child(0).free()
Piece.reparent(node)
Piece.position = pos
Update_Game(node)
elif Selected_Node != "" && node.get_child_count() == 0:
# Moving a piece
for i in Areas:
if i == node.name:
var Piece = get_node("Flow/" + Selected_Node).get_child(0)
Piece.reparent(node)
Piece.position = pos
Update_Game(node)
func Update_Game(node):
Selected_Node = ""
if Turn == 0:
Turn = 1
else:
Turn = 0
update_turn_indicator()
reset_highlights();
deck_manager.update_card_durations()
has_moved = false
currently_moving_piece = null
var Flow = get_node("Flow")
# get the en-passantable pieces and undo them
var things = Flow.get_children()
for i in things:
if i.get_child_count() != 0 && i.get_child(0).name == "Pawn" && i.get_child(0).Item_Color == Turn && i.get_child(0).En_Passant == true:
i.get_child(0).set("En_Passant", false)
# Remove the abilities once they are either used or not used
if node.get_child(0).name == "Pawn":
if node.get_child(0).Double_Start == true:
node.get_child(0).En_Passant = true
node.get_child(0).Double_Start = false
if node.get_child(0).name == "King":
node.get_child(0).Castling = false
if node.get_child(0).name == "Rook":
node.get_child(0).Castling = false
# Below is the movement that is used for the pieces
func Get_Moveable_Areas():
var Flow = get_node("Flow")
for button in Flow.get_children():
var coord = button.name.split("-")
var isWhiteSquare = (int(coord[0]) + int(coord[1])) % 2 == 0
if isWhiteSquare:
button.add_theme_stylebox_override("normal", light_style)
else:
button.add_theme_stylebox_override("normal", dark_style)
# Clearing the arrays
Areas.clear()
Special_Area.clear()
var Piece = get_node("Flow/" + Selected_Node).get_child(0)
# For the selected piece that we have, we can get the movement that we need here.
var moves = Piece.get_valid_moves(Flow, Selected_Node)
Areas = moves.regular_moves
Special_Area = moves.special_moves
# Highlight valid moves
for move in Areas:
var button = Flow.get_node(move)
var isWhiteSquare = (int(move.split("-")[0]) + int(move.split("-")[1])) % 2 == 0
var baseStyle = dark_style
if isWhiteSquare:
baseStyle = light_style
var combinedStyle = StyleBoxFlat.new()
combinedStyle.bg_color = baseStyle.bg_color + highlight_style.bg_color
button.add_theme_stylebox_override("normal", combinedStyle)
# One function that shortens everything. Its also a pretty good way to see if we went off the board or not.
func Is_Null(Location):
if get_node_or_null("Flow/" + Location) == null:
return true
else:
return false

106
Generator.gd Normal file
View file

@ -0,0 +1,106 @@
extends FlowContainer
@export var Board_X_Size = 8
@export var Board_Y_Size = 8
@export var Tile_X_Size: int = 50
@export var Tile_Y_Size: int = 50
signal send_location
func _ready():
# stop negative numbers from happening
if Board_X_Size < 0 || Board_Y_Size < 0:
return
var Number_X = 0
var Number_Y = 0
var is_white = true
var light_style = StyleBoxFlat.new()
light_style.bg_color = Color(0.8, 0.8, 0.8, 1)
var dark_style = StyleBoxFlat.new()
dark_style.bg_color = Color(0.2, 0.2, 0.2, 1)
# Set up the board
while Number_Y != Board_Y_Size:
self.size.y += Tile_Y_Size + 5
self.size.x += Tile_X_Size + 5
while Number_X != Board_X_Size:
var temp = Button.new()
temp.set_custom_minimum_size(Vector2(Tile_X_Size, Tile_Y_Size))
if is_white:
temp.add_theme_stylebox_override("normal", light_style)
else:
temp.add_theme_stylebox_override("normal", dark_style)
is_white = !is_white
temp.connect("pressed", func():
emit_signal("send_location", temp.name))
temp.set_name(str(Number_X) + "-" + str(Number_Y))
add_child(temp)
Number_X += 1
is_white = !is_white
Number_Y += 1
Number_X = 0
Regular_Game()
func Regular_Game():
get_node("0-0").add_child(Summon("Rook", 1))
get_node("1-0").add_child(Summon("Knight", 1))
get_node("2-0").add_child(Summon("Bishop", 1))
get_node("3-0").add_child(Summon("Queen", 1))
get_node("4-0").add_child(Summon("King", 1))
get_node("5-0").add_child(Summon("Bishop", 1))
get_node("6-0").add_child(Summon("Knight", 1))
get_node("7-0").add_child(Summon("Rook", 1))
get_node("0-1").add_child(Summon("Pawn", 1))
get_node("1-1").add_child(Summon("Pawn", 1))
get_node("2-1").add_child(Summon("Pawn", 1))
get_node("3-1").add_child(Summon("Pawn", 1))
get_node("4-1").add_child(Summon("Pawn", 1))
get_node("5-1").add_child(Summon("Pawn", 1))
get_node("6-1").add_child(Summon("Pawn", 1))
get_node("7-1").add_child(Summon("Pawn", 1))
get_node("0-7").add_child(Summon("Rook", 0))
get_node("1-7").add_child(Summon("Knight", 0))
get_node("2-7").add_child(Summon("Bishop", 0))
get_node("3-7").add_child(Summon("Queen", 0))
get_node("4-7").add_child(Summon("King", 0))
get_node("5-7").add_child(Summon("Bishop", 0))
get_node("6-7").add_child(Summon("Knight", 0))
get_node("7-7").add_child(Summon("Rook", 0))
get_node("0-6").add_child(Summon("Pawn", 0))
get_node("1-6").add_child(Summon("Pawn", 0))
get_node("2-6").add_child(Summon("Pawn", 0))
get_node("3-6").add_child(Summon("Pawn", 0))
get_node("4-6").add_child(Summon("Pawn", 0))
get_node("5-6").add_child(Summon("Pawn", 0))
get_node("6-6").add_child(Summon("Pawn", 0))
get_node("7-6").add_child(Summon("Pawn", 0))
func Summon(Piece_Name: String, color: int):
var Piece
match Piece_Name:
"Pawn":
Piece = Pawn.new()
Piece.name = "Pawn"
"King":
Piece = King.new()
Piece.name = "King"
"Queen":
Piece = Queen.new()
Piece.name = "Queen"
"Knight":
Piece = Knight.new()
Piece.name = "Knight"
"Rook":
Piece = Rook.new()
Piece.name = "Rook"
"Bishop":
Piece = Bishop.new()
Piece.name = "Bishop"
Piece.Item_Color = color
Piece.position = Vector2(Tile_X_Size / 2, Tile_Y_Size / 2)
return Piece

58
Systems/Card.gd Normal file
View file

@ -0,0 +1,58 @@
extends Resource
class_name Card
enum Rank {RANK_0, RANK_1, RANK_2, RANK_3}
enum EffectType {
MOVEMENT_MODIFIER,
BOARD_EFFECT,
PIECE_EFFECT,
SPECIAL_ACTION
}
var card_name: String
var rank: Rank
var description: String
var duration: int = 0
var attached_piece: Pawn = null
var burned: bool = false
var effect_type: EffectType
var remaining_turns: int = 0
var unit_whitelist: Array[String] = [] # List of piece types this card can be attached to
func _init():
remaining_turns = duration
func can_attach_to_piece(piece: Pawn) -> bool:
if unit_whitelist.is_empty():
return true
return unit_whitelist.has(piece.name)
func apply_effect(target_piece = null, board_flow = null, game_state = null):
if burned || (target_piece && !can_attach_to_piece(target_piece)):
return false
remaining_turns = duration
attached_piece = target_piece
match rank:
Rank.RANK_0: burned = true
Rank.RANK_1: burned = true
Rank.RANK_2: pass
Rank.RANK_3: pass
return modify_moves()
func update_duration():
if remaining_turns > 0:
remaining_turns -= 1
if remaining_turns <= 0:
remove_effect()
func modify_moves() -> Dictionary:
return {}
func remove_effect():
if attached_piece:
pass

50
Systems/CardDisplay.gd Normal file
View file

@ -0,0 +1,50 @@
extends Control
class_name CardDisplay
var card_displays = []
const CARD_WIDTH = 100
const CARD_HEIGHT = 150
const CARD_MARGIN = 10
var container: HBoxContainer
func _ready():
container = HBoxContainer.new()
container.name = "CardContainer"
container.set_position(Vector2(10, 500))
add_child(container)
func update_hand(hand: Array):
clear_cards()
for card in hand:
add_card_display(card)
func add_card_display(card: Card):
var card_panel = PanelContainer.new()
card_panel.custom_minimum_size = Vector2(CARD_WIDTH, CARD_HEIGHT)
var vbox = VBoxContainer.new()
card_panel.add_child(vbox)
var name_label = Label.new()
name_label.text = card.card_name
name_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
vbox.add_child(name_label)
var rank_label = Label.new()
rank_label.text = "Rank " + str(card.rank)
rank_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
vbox.add_child(rank_label)
var desc_label = Label.new()
desc_label.text = card.description
desc_label.autowrap_mode = TextServer.AUTOWRAP_WORD
desc_label.custom_minimum_size = Vector2(CARD_WIDTH - 10, 0)
vbox.add_child(desc_label)
card_displays.append(card_panel)
container.add_child(card_panel)
func clear_cards():
for display in card_displays:
display.queue_free()
card_displays.clear()

View file

@ -0,0 +1,22 @@
class DoubleTimeCard extends Card:
func _init():
super._init()
card_name = "Double Time"
rank = Rank.RANK_2
effect_type = EffectType.MOVEMENT_MODIFIER
description = "Piece can move twice in one turn"
duration = 2 # Lasts for 2 turns
func modify_moves() -> Dictionary:
return {
"extra_moves": 1,
"move_multiplier": 1
}
func apply_effect(target_piece = null, board_flow = null, game_state = null):
if !super.apply_effect(target_piece, board_flow, game_state):
return false
# Logic to allow second move would be implemented in Game.gd
attached_piece = target_piece
return true

View file

@ -0,0 +1,19 @@
class DrunkDrivingCard extends Card:
func _init():
super._init()
card_name = "Drunk Driving"
rank = Rank.RANK_1
effect_type = EffectType.SPECIAL_ACTION
description = "Force Rook to move to opposite end"
unit_whitelist = ["Rook"] # Can only be attached to Rooks
func apply_effect(target_piece = null, board_flow = null, game_state = null):
if !super.apply_effect(target_piece, board_flow, game_state):
return false
if target_piece:
var current_pos = target_piece.get_parent().name.split("-")
var target_x = current_pos[0]
var target_y = "0" if target_piece.Item_Color == 0 else "7"
return [target_x + "-" + target_y]
return false

View file

@ -0,0 +1,20 @@
class SupernovaCard extends Card:
func _init():
super._init()
card_name = "Supernova"
rank = Rank.RANK_0
effect_type = EffectType.PIECE_EFFECT
description = "Remove all abilities from enemy pieces"
unit_whitelist = ["King"] # Can only be used by Kings
func apply_effect(target_piece = null, board_flow = null, game_state = null):
if !super.apply_effect(target_piece, board_flow, game_state):
return false
if board_flow:
for cell in board_flow.get_children():
if cell.get_child_count() > 0:
var piece = cell.get_child(0)
if piece.Item_Color != target_piece.Item_Color:
pass
return true

106
Systems/DeckManager.gd Normal file
View file

@ -0,0 +1,106 @@
extends Node
class_name DeckManager
var deck: Array = []
var hand: Array = []
var discard: Array = []
var attached_cards: Dictionary = {} # piece_id: card
var hand_size: int = 5
# Card costs for shop
const CARD_BASE_COSTS = {
Card.Rank.RANK_0: 100,
Card.Rank.RANK_1: 75,
Card.Rank.RANK_2: 50,
Card.Rank.RANK_3: 25
}
func _init():
initialize_starting_deck()
func initialize_starting_deck():
# Add basic Rank 3 and 4 cards as per design doc
for i in range(10):
deck.append(Card.new()) # Basic movement cards
shuffle_deck()
draw_starting_hand()
func shuffle_deck():
deck.shuffle()
func draw_starting_hand():
for i in range(min(hand_size, deck.size())):
draw_card()
func draw_card():
if deck.is_empty() && !discard.is_empty():
deck = discard.duplicate()
discard.clear()
shuffle_deck()
if !deck.is_empty() && hand.size() < hand_size:
hand.append(deck.pop_back())
signal hand_updated
func play_card(card: Card, target_piece: Pawn, board_flow = null, game_state = null):
if !hand.has(card):
return false
emit_signal("hand_updated", hand)
if card.apply_effect(target_piece, board_flow, game_state):
hand.erase(card)
match card.rank:
Card.Rank.RANK_0:
# Burned permanently
pass
Card.Rank.RANK_1:
# Burned until next match
pass
Card.Rank.RANK_2:
discard.append(card)
Card.Rank.RANK_3:
deck.append(card)
shuffle_deck()
if card.duration > 0:
attached_cards[target_piece.get_instance_id()] = card
return true
return false
func update_card_durations():
var expired_cards = []
for piece_id in attached_cards:
var card = attached_cards[piece_id]
card.update_duration()
if card.remaining_turns <= 0:
expired_cards.append(piece_id)
for piece_id in expired_cards:
attached_cards.erase(piece_id)
# Shop functionality
func get_shop_cards(num_cards: int = 3) -> Array:
var shop_cards = []
# Generate random shop selection
#for i in range(num_cards):
#var card = generate_random_card()
#shop_cards.append({
#"card": card,
#"cost": calculate_card_cost(card)
#})
return shop_cards
func calculate_card_cost(card: Card) -> int:
var base_cost = CARD_BASE_COSTS[card.rank]
# Add modifiers based on card effects
return base_cost
func upgrade_card(card: Card) -> bool:
# Implement card upgrading logic
return false

22
addons/Chess/Chess.gd Normal file
View file

@ -0,0 +1,22 @@
@tool
extends EditorPlugin
func _enter_tree():
# Initialization of the plugin goes here.
add_custom_type("Pawn", "Sprite2D", preload("res://addons/Chess/Scripts/Pawn.gd"), preload("res://addons/Chess/Textures/WPawn.svg"))
add_custom_type("King", "Sprite2D", preload("res://addons/Chess/Scripts/King.gd"), preload("res://addons/Chess/Textures/WKing.svg"))
add_custom_type("Bishop", "Sprite2D", preload("res://addons/Chess/Scripts/Bishop.gd"), preload("res://addons/Chess/Textures/WBishop.svg"))
add_custom_type("Knight", "Sprite2D", preload("res://addons/Chess/Scripts/Knight.gd"), preload("res://addons/Chess/Textures/WKnight.svg"))
add_custom_type("Queen", "Sprite2D", preload("res://addons/Chess/Scripts/Queen.gd"), preload("res://addons/Chess/Textures/WQueen.svg"))
add_custom_type("Rook", "Sprite2D", preload("res://addons/Chess/Scripts/Rook.gd"), preload("res://addons/Chess/Textures/WRook.svg"))
func _exit_tree():
# Clean-up of the plugin goes here.
remove_custom_type("Pawn")
remove_custom_type("King")
remove_custom_type("Bishop")
remove_custom_type("Knight")
remove_custom_type("Queen")
remove_custom_type("Rook")

View file

@ -0,0 +1,49 @@
@tool
extends Pawn
class_name Bishop
func _ready():
self.texture = load("res://addons/Chess/Textures/WBishop.svg")
Points = 3
func _process(_delta):
if Item_Color != Temp_Color:
Temp_Color = Item_Color
if Item_Color == 0:
self.texture = load("res://addons/Chess/Textures/WBishop.svg")
elif Item_Color == 1:
self.texture = load("res://addons/Chess/Textures/BBishop.svg")
func get_valid_moves(board_flow, current_location: String) -> Dictionary:
var moves = {
"regular_moves": [],
"special_moves": []
}
var loc = current_location.split("-")
var x = int(loc[0])
var y = int(loc[1])
# Bishop moves diagonally
var diagonal_dirs = [[1,1], [1,-1], [-1,1], [-1,-1]]
for dir in diagonal_dirs:
var curr_x = x
var curr_y = y
while true:
curr_x += dir[0]
curr_y += dir[1]
var new_loc = str(curr_x) + "-" + str(curr_y)
if !is_valid_cell(board_flow, new_loc):
break
if can_move_to_cell(board_flow, new_loc):
moves.regular_moves.append(new_loc)
elif can_move_to_cell(board_flow, new_loc, true):
moves.regular_moves.append(new_loc)
break
else:
break
return moves

View file

@ -0,0 +1,94 @@
@tool
extends Pawn
class_name King
var Castling = true
func _ready():
self.texture = load("res://addons/Chess/Textures/WKing.svg")
Points = 10
func _process(_delta):
if Item_Color != Temp_Color:
Temp_Color = Item_Color
if Item_Color == 0:
self.texture = load("res://addons/Chess/Textures/WKing.svg")
elif Item_Color == 1:
self.texture = load("res://addons/Chess/Textures/BKing.svg")
# King.gd
func get_valid_moves(board_flow, current_location: String) -> Dictionary:
var moves = {
"regular_moves": [],
"special_moves": []
}
var loc = current_location.split("-")
var x = int(loc[0])
var y = int(loc[1])
# Regular king moves (unchanged)
var king_dirs = [[0,1], [0,-1], [1,0], [-1,0], [1,1], [1,-1], [-1,1], [-1,-1]]
for dir in king_dirs:
var new_loc = str(x + dir[0]) + "-" + str(y + dir[1])
if is_valid_cell(board_flow, new_loc):
if can_move_to_cell(board_flow, new_loc) || can_move_to_cell(board_flow, new_loc, true):
moves.regular_moves.append(new_loc)
# Castling logic
if Castling:
# Kingside castling (right side)
if check_kingside_castle(board_flow, x, y):
# Add rook's current position to regular moves
moves.regular_moves.append(str(x + 3) + "-" + str(y))
# Add king and rook destinations to special moves as individual items
moves.special_moves.append(str(x + 1) + "-" + str(y)) # Rook's destination
moves.special_moves.append(str(x + 2) + "-" + str(y)) # King's destination
# Queenside castling (left side)
if check_queenside_castle(board_flow, x, y):
# Add rook's current position to regular moves
moves.regular_moves.append(str(x - 4) + "-" + str(y))
# Add king and rook destinations to special moves as individual items
moves.special_moves.append(str(x - 1) + "-" + str(y)) # Rook's destination
moves.special_moves.append(str(x - 2) + "-" + str(y)) # King's destination
return moves
func check_kingside_castle(board_flow, x: int, y: int) -> bool:
# Check if path is clear
for i in range(1, 3):
var check_pos = str(x + i) + "-" + str(y)
if !is_valid_cell(board_flow, check_pos) || !can_move_to_cell(board_flow, check_pos):
return false
# Check if rook is in position and hasn't moved
var rook_pos = str(x + 3) + "-" + str(y)
if !is_valid_cell(board_flow, rook_pos):
return false
var rook_node = board_flow.get_node(rook_pos)
if rook_node.get_child_count() != 1:
return false
var rook = rook_node.get_child(0)
return rook.name == "Rook" && rook.Castling && rook.Item_Color == self.Item_Color
func check_queenside_castle(board_flow, x: int, y: int) -> bool:
# Check if path is clear
for i in range(1, 4):
var check_pos = str(x - i) + "-" + str(y)
if !is_valid_cell(board_flow, check_pos) || !can_move_to_cell(board_flow, check_pos):
return false
# Check if rook is in position and hasn't moved
var rook_pos = str(x - 4) + "-" + str(y)
if !is_valid_cell(board_flow, rook_pos):
return false
var rook_node = board_flow.get_node(rook_pos)
if rook_node.get_child_count() != 1:
return false
var rook = rook_node.get_child(0)
return rook.name == "Rook" && rook.Castling && rook.Item_Color == self.Item_Color

View file

@ -0,0 +1,40 @@
@tool
extends Pawn
class_name Knight
func _ready():
self.texture = load("res://addons/Chess/Textures/WKnight.svg")
Points = 3
func _process(_delta):
if Item_Color != Temp_Color:
Temp_Color = Item_Color
if Item_Color == 0:
self.texture = load("res://addons/Chess/Textures/WKnight.svg")
elif Item_Color == 1:
self.texture = load("res://addons/Chess/Textures/BKnight.svg")
func get_valid_moves(board_flow, current_location: String) -> Dictionary:
var moves = {
"regular_moves": [],
"special_moves": []
}
var loc = current_location.split("-")
var x = int(loc[0])
var y = int(loc[1])
# All possible L-shaped moves
var knight_moves = [
[-2, -1], [-2, 1],
[-1, -2], [-1, 2],
[1, -2], [1, 2],
[2, -1], [2, 1]
]
for move in knight_moves:
var new_loc = str(x + move[0]) + "-" + str(y + move[1])
if is_valid_cell(board_flow, new_loc):
if can_move_to_cell(board_flow, new_loc) || can_move_to_cell(board_flow, new_loc, true):
moves.regular_moves.append(new_loc)
return moves

View file

@ -0,0 +1,82 @@
@tool
extends Sprite2D
class_name Pawn
@export var Current_X_Position = 0
@export var Current_Y_Position = 0
# Item_Color = 0; White
# Item_Color = 1; Black
@export var Item_Color = 0
@export var Points = 1
var Temp_Color = 0
var Double_Start = true
var En_Passant = false
func _ready():
self.texture = load("res://addons/Chess/Textures/WPawn.svg")
func _process(_delta):
if Item_Color != Temp_Color:
Temp_Color = Item_Color
if Item_Color == 0:
self.texture = load("res://addons/Chess/Textures/WPawn.svg")
elif Item_Color == 1:
self.texture = load("res://addons/Chess/Textures/BPawn.svg")
# Movement interface method that all pieces will implement
# In Pawn.gd
func get_valid_moves(board_flow, current_location: String) -> Dictionary:
var moves = {
"regular_moves": [],
"special_moves": []
}
var loc = current_location.split("-")
var x = int(loc[0])
var y = int(loc[1])
# Movement direction based on color
var direction = -1 if Item_Color == 0 else 1
# Forward movement
var forward = str(x) + "-" + str(y + direction)
if is_valid_cell(board_flow, forward) && can_move_to_cell(board_flow, forward):
moves.regular_moves.append(forward)
# Double move on first turn
var double_forward = str(x) + "-" + str(y + (direction * 2))
if Double_Start && is_valid_cell(board_flow, double_forward) && can_move_to_cell(board_flow, double_forward):
moves.regular_moves.append(double_forward)
# Diagonal captures
for dx in [-1, 1]:
var capture = str(x + dx) + "-" + str(y + direction)
if is_valid_cell(board_flow, capture) && can_move_to_cell(board_flow, capture, true):
moves.regular_moves.append(capture)
# En Passant
var adjacent = str(x + dx) + "-" + str(y)
if is_valid_cell(board_flow, adjacent) && is_valid_cell(board_flow, capture):
var adjacent_cell = board_flow.get_node(adjacent)
if adjacent_cell.get_child_count() == 1:
var adjacent_piece = adjacent_cell.get_child(0)
if adjacent_piece.name == "Pawn" && adjacent_piece.En_Passant && adjacent_piece.Item_Color != self.Item_Color:
moves.special_moves.append([adjacent, capture])
return moves
# Helper method for all pieces
func is_valid_cell(board_flow, location: String) -> bool:
var node = board_flow.get_node_or_null(location)
return node != null
# Helper for checking if cell is empty or contains enemy
func can_move_to_cell(board_flow, location: String, is_capture: bool = false) -> bool:
var node = board_flow.get_node(location)
if is_capture:
return node.get_child_count() == 1 && node.get_child(0).Item_Color != self.Item_Color
return node.get_child_count() == 0

View file

@ -0,0 +1,69 @@
@tool
extends Pawn
class_name Queen
func _ready():
self.texture = load("res://addons/Chess/Textures/WQueen.svg")
Points = 9
func _process(_delta):
if Item_Color != Temp_Color:
Temp_Color = Item_Color
if Item_Color == 0:
self.texture = load("res://addons/Chess/Textures/WQueen.svg")
elif Item_Color == 1:
self.texture = load("res://addons/Chess/Textures/BQueen.svg")
func get_valid_moves(board_flow, current_location: String) -> Dictionary:
var moves = {
"regular_moves": [],
"special_moves": []
}
var loc = current_location.split("-")
var x = int(loc[0])
var y = int(loc[1])
# Queen combines rook (straight) and bishop (diagonal) movements
# Straight movements
var straight_dirs = [[0,1], [0,-1], [1,0], [-1,0]]
for dir in straight_dirs:
var curr_x = x
var curr_y = y
while true:
curr_x += dir[0]
curr_y += dir[1]
var new_loc = str(curr_x) + "-" + str(curr_y)
if !is_valid_cell(board_flow, new_loc):
break
if can_move_to_cell(board_flow, new_loc):
moves.regular_moves.append(new_loc)
elif can_move_to_cell(board_flow, new_loc, true):
moves.regular_moves.append(new_loc)
break
else:
break
# Diagonal movements
var diagonal_dirs = [[1,1], [1,-1], [-1,1], [-1,-1]]
for dir in diagonal_dirs:
var curr_x = x
var curr_y = y
while true:
curr_x += dir[0]
curr_y += dir[1]
var new_loc = str(curr_x) + "-" + str(curr_y)
if !is_valid_cell(board_flow, new_loc):
break
if can_move_to_cell(board_flow, new_loc):
moves.regular_moves.append(new_loc)
elif can_move_to_cell(board_flow, new_loc, true):
moves.regular_moves.append(new_loc)
break
else:
break
return moves

View file

@ -0,0 +1,60 @@
@tool
extends Pawn
class_name Rook
var Castling = true
func _ready():
self.texture = load("res://addons/Chess/Textures/WRook.svg")
Points = 5
func _process(_delta):
if Item_Color != Temp_Color:
Temp_Color = Item_Color
if Item_Color == 0:
self.texture = load("res://addons/Chess/Textures/WRook.svg")
elif Item_Color == 1:
self.texture = load("res://addons/Chess/Textures/BRook.svg")
func get_valid_moves(board_flow, current_location: String) -> Dictionary:
var moves = {
"regular_moves": [],
"special_moves": []
}
var loc = current_location.split("-")
var x = int(loc[0])
var y = int(loc[1])
# Check all four directions
var directions = [[0,1], [0,-1], [1,0], [-1,0]]
for dir in directions:
var curr_x = x
var curr_y = y
while true:
curr_x += dir[0]
curr_y += dir[1]
var new_loc = str(curr_x) + "-" + str(curr_y)
if !is_valid_cell(board_flow, new_loc):
break
if can_move_to_cell(board_flow, new_loc):
moves.regular_moves.append(new_loc)
elif can_move_to_cell(board_flow, new_loc, true):
moves.regular_moves.append(new_loc)
break
else:
break
if Castling:
# Check if there's a king that can castle
for direction in [-4, 3]: # Check both sides for king
var king_pos = str(x + direction) + "-" + str(y)
if is_valid_cell(board_flow, king_pos):
var king_node = board_flow.get_node(king_pos)
if king_node.get_child_count() == 1:
var piece = king_node.get_child(0)
if piece.name == "King" && piece.Castling && piece.Item_Color == self.Item_Color:
moves.special_moves.append([king_pos, current_location])
return moves

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="opacity:1; fill:none; fill-rule:evenodd; fill-opacity:1; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.6)">
<g style="fill:#000000; stroke:#000000; stroke-linecap:butt;">
<path d="M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"/>
<path d="M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"/>
<path d="M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"/>
</g>
<path d="M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18" style="fill:none; stroke:#ffffff; stroke-linejoin:miter;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ca8t2shoassp2"
path="res://.godot/imported/BBishop.svg-caa7e8161cebaa9725ca98da7728dcf3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/BBishop.svg"
dest_files=["res://.godot/imported/BBishop.svg-caa7e8161cebaa9725ca98da7728dcf3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;">
<path d="M 22.5,11.63 L 22.5,6" style="fill:none; stroke:#000000; stroke-linejoin:miter;" id="path6570"/>
<path d="M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25" style="fill:#000000;fill-opacity:1; stroke-linecap:butt; stroke-linejoin:miter;"/>
<path d="M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37" style="fill:#000000; stroke:#000000;"/>
<path d="M 20,8 L 25,8" style="fill:none; stroke:#000000; stroke-linejoin:miter;"/>
<path d="M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.5,26.6 L 22.5,24.5 C 20,18 10.85,14 6.97,19.85 C 4.5,25.5 13,29.5 13,29.5" style="fill:none; stroke:#ffffff;"/>
<path d="M 12.5,30 C 18,27 27,27 32.5,30 M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5 M 12.5,37 C 18,34 27,34 32.5,37" style="fill:none; stroke:#ffffff;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b8e8353pyae4l"
path="res://.godot/imported/BKing.svg-5f2dae3f9e9fd99c551e2bbdcedcbe5f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/BKing.svg"
dest_files=["res://.godot/imported/BKing.svg-5f2dae3f9e9fd99c551e2bbdcedcbe5f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="opacity:1; fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)">
<path
d="M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18"
style="fill:#000000; stroke:#000000;" />
<path
d="M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10"
style="fill:#000000; stroke:#000000;" />
<path
d="M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z"
style="fill:#ffffff; stroke:#ffffff;" />
<path
d="M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z"
transform="matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)"
style="fill:#ffffff; stroke:#ffffff;" />
<path
d="M 24.55,10.4 L 24.1,11.85 L 24.6,12 C 27.75,13 30.25,14.49 32.5,18.75 C 34.75,23.01 35.75,29.06 35.25,39 L 35.2,39.5 L 37.45,39.5 L 37.5,39 C 38,28.94 36.62,22.15 34.25,17.66 C 31.88,13.17 28.46,11.02 25.06,10.5 L 24.55,10.4 z "
style="fill:#ffffff; stroke:none;" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bjneg3fh7mu2e"
path="res://.godot/imported/BKnight.svg-7f401d8bdc16da86b2c2004013a9bd52.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/BKnight.svg"
dest_files=["res://.godot/imported/BKnight.svg-7f401d8bdc16da86b2c2004013a9bd52.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<path d="m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z" style="opacity:1; fill:#000000; fill-opacity:1; fill-rule:nonzero; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:miter; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"/>
</svg>

After

Width:  |  Height:  |  Size: 766 B

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1sql4pmy32c8"
path="res://.godot/imported/BPawn.svg-69542c0e9157623a0a057f4d726baaa4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/BPawn.svg"
dest_files=["res://.godot/imported/BPawn.svg-69542c0e9157623a0a057f4d726baaa4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45"
height="45">
<g style="fill:#000000;stroke:#000000;stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round">
<path d="M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z"
style="stroke-linecap:butt;fill:#000000" />
<path d="m 9,26 c 0,2 1.5,2 2.5,4 1,1.5 1,1 0.5,3.5 -1.5,1 -1,2.5 -1,2.5 -1.5,1.5 0,2.5 0,2.5 6.5,1 16.5,1 23,0 0,0 1.5,-1 0,-2.5 0,0 0.5,-1.5 -1,-2.5 -0.5,-2.5 -0.5,-2 0.5,-3.5 1,-2 2.5,-2 2.5,-4 -8.5,-1.5 -18.5,-1.5 -27,0 z" />
<path d="M 11.5,30 C 15,29 30,29 33.5,30" />
<path d="m 12,33.5 c 6,-1 15,-1 21,0" />
<circle cx="6" cy="12" r="2" />
<circle cx="14" cy="9" r="2" />
<circle cx="22.5" cy="8" r="2" />
<circle cx="31" cy="9" r="2" />
<circle cx="39" cy="12" r="2" />
<path d="M 11,38.5 A 35,35 1 0 0 34,38.5"
style="fill:none; stroke:#000000;stroke-linecap:butt;" />
<g style="fill:none; stroke:#ffffff;">
<path d="M 11,29 A 35,35 1 0 1 34,29" />
<path d="M 12.5,31.5 L 32.5,31.5" />
<path d="M 11.5,34.5 A 35,35 1 0 0 33.5,34.5" />
<path d="M 10.5,37.5 A 35,35 1 0 0 34.5,37.5" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cla2mshxp0elx"
path="res://.godot/imported/BQueen.svg-43c2121313f7ae80039aa817f5e6e5ae.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/BQueen.svg"
dest_files=["res://.godot/imported/BQueen.svg-43c2121313f7ae80039aa817f5e6e5ae.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="opacity:1; fill:#000000; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)">
<path
d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z "
style="stroke-linecap:butt;" />
<path
d="M 12.5,32 L 14,29.5 L 31,29.5 L 32.5,32 L 12.5,32 z "
style="stroke-linecap:butt;" />
<path
d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z "
style="stroke-linecap:butt;" />
<path
d="M 14,29.5 L 14,16.5 L 31,16.5 L 31,29.5 L 14,29.5 z "
style="stroke-linecap:butt;stroke-linejoin:miter;" />
<path
d="M 14,16.5 L 11,14 L 34,14 L 31,16.5 L 14,16.5 z "
style="stroke-linecap:butt;" />
<path
d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 z "
style="stroke-linecap:butt;" />
<path
d="M 12,35.5 L 33,35.5 L 33,35.5"
style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" />
<path
d="M 13,31.5 L 32,31.5"
style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" />
<path
d="M 14,29.5 L 31,29.5"
style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" />
<path
d="M 14,16.5 L 31,16.5"
style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" />
<path
d="M 11,14 L 34,14"
style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://2an2oqh0ks1y"
path="res://.godot/imported/BRook.svg-fcf0e0216572b051e0d829eef86c69c8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/BRook.svg"
dest_files=["res://.godot/imported/BRook.svg-fcf0e0216572b051e0d829eef86c69c8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="opacity:1; fill:none; fill-rule:evenodd; fill-opacity:1; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.6)">
<g style="fill:#ffffff; stroke:#000000; stroke-linecap:butt;">
<path d="M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"/>
<path d="M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"/>
<path d="M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"/>
</g>
<path d="M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18" style="fill:none; stroke:#000000; stroke-linejoin:miter;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bal1cx2x7hk7l"
path="res://.godot/imported/WBishop.svg-8d8d69e7026e6a8ebafe899e6c3db44a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/WBishop.svg"
dest_files=["res://.godot/imported/WBishop.svg-8d8d69e7026e6a8ebafe899e6c3db44a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45">
<g fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
<path stroke-linejoin="miter" d="M22.5 11.63V6M20 8h5"/>
<path fill="#fff" stroke-linecap="butt" stroke-linejoin="miter" d="M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/>
<path fill="#fff" d="M12.5 37c5.5 3.5 14.5 3.5 20 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V27v-3.5c-2.5-7.5-12-10.5-16-4-3 6 6 10.5 6 10.5v7"/>
<path d="M12.5 30c5.5-3 14.5-3 20 0m-20 3.5c5.5-3 14.5-3 20 0m-20 3.5c5.5-3 14.5-3 20 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 700 B

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgeifkewhw83q"
path="res://.godot/imported/WKing.svg-7fc9428910d7accc920c7dcbb55e9e89.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/WKing.svg"
dest_files=["res://.godot/imported/WKing.svg-7fc9428910d7accc920c7dcbb55e9e89.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="opacity:1; fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)">
<path
d="M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18"
style="fill:#ffffff; stroke:#000000;" />
<path
d="M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10"
style="fill:#ffffff; stroke:#000000;" />
<path
d="M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z"
style="fill:#000000; stroke:#000000;" />
<path
d="M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z"
transform="matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)"
style="fill:#000000; stroke:#000000;" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnp45xyp0eesa"
path="res://.godot/imported/WKnight.svg-511cbd9440386db76ded28b418432666.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/WKnight.svg"
dest_files=["res://.godot/imported/WKnight.svg-511cbd9440386db76ded28b418432666.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<path d="m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z" style="opacity:1; fill:#ffffff; fill-opacity:1; fill-rule:nonzero; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:miter; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"/>
</svg>

After

Width:  |  Height:  |  Size: 766 B

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dl5dp47xg34sb"
path="res://.godot/imported/WPawn.svg-d6caa773d0f71f225bae31a4e926de85.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/WPawn.svg"
dest_files=["res://.godot/imported/WPawn.svg-d6caa773d0f71f225bae31a4e926de85.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="fill:#ffffff;stroke:#000000;stroke-width:1.5;stroke-linejoin:round">
<path d="M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z"/>
<path d="M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 11,36 11,36 C 9.5,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z"/>
<path d="M 11.5,30 C 15,29 30,29 33.5,30" style="fill:none"/>
<path d="M 12,33.5 C 18,32.5 27,32.5 33,33.5" style="fill:none"/>
<circle cx="6" cy="12" r="2" />
<circle cx="14" cy="9" r="2" />
<circle cx="22.5" cy="8" r="2" />
<circle cx="31" cy="9" r="2" />
<circle cx="39" cy="12" r="2" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cr1lku07l36wb"
path="res://.godot/imported/WQueen.svg-5b2a2821ab5f933be4cb9be7369ada28.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/WQueen.svg"
dest_files=["res://.godot/imported/WQueen.svg-5b2a2821ab5f933be4cb9be7369ada28.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="opacity:1; fill:#ffffff; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)">
<path
d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z "
style="stroke-linecap:butt;" />
<path
d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z "
style="stroke-linecap:butt;" />
<path
d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14"
style="stroke-linecap:butt;" />
<path
d="M 34,14 L 31,17 L 14,17 L 11,14" />
<path
d="M 31,17 L 31,29.5 L 14,29.5 L 14,17"
style="stroke-linecap:butt; stroke-linejoin:miter;" />
<path
d="M 31,29.5 L 32.5,32 L 12.5,32 L 14,29.5" />
<path
d="M 11,14 L 34,14"
style="fill:none; stroke:#000000; stroke-linejoin:miter;" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://qisaumos7b53"
path="res://.godot/imported/WRook.svg-ded88be9bedc570bb66d27120b68b78a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/Chess/Textures/WRook.svg"
dest_files=["res://.godot/imported/WRook.svg-ded88be9bedc570bb66d27120b68b78a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

7
addons/Chess/plugin.cfg Normal file
View file

@ -0,0 +1,7 @@
[plugin]
name="Chess"
description=""
author="CatAClock"
version="1.0"
script="Chess.gd"

75
board.tscn Normal file
View file

@ -0,0 +1,75 @@
[gd_scene load_steps=3 format=3 uid="uid://d0qyk6v20uief"]
[ext_resource type="Script" path="res://Generator.gd" id="1_ckrtr"]
[ext_resource type="Script" path="res://Game.gd" id="1_f1l42"]
[node name="Board" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_f1l42")
[node name="Flow" type="FlowContainer" parent="."]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -252.0
offset_right = -252.0
grow_horizontal = 2
script = ExtResource("1_ckrtr")
[node name="Player1Points" type="RichTextLabel" parent="."]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -50.0
offset_top = 50.0
offset_bottom = 89.0
grow_horizontal = 0
[node name="Player2Points" type="RichTextLabel" parent="."]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -48.0
offset_top = 100.0
offset_bottom = 140.0
grow_horizontal = 0
[node name="TurnIndicator" type="ColorRect" parent="."]
custom_minimum_size = Vector2(50, 50)
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -50.0
offset_bottom = 50.0
grow_horizontal = 0
[node name="RichTextLabel" type="RichTextLabel" parent="."]
layout_mode = 0
offset_left = 1062.0
offset_top = 65.0
offset_right = 1142.0
offset_bottom = 104.0
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -20.0
offset_top = -40.0
offset_right = 20.0
grow_horizontal = 2
grow_vertical = 0
[connection signal="send_location" from="Flow" to="." method="_on_flow_send_location"]

1
icon.svg Normal file
View file

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(32 32)"><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99z" fill="#363d52"/><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99zm0 4h96c6.64 0 12 5.35 12 11.99v95.98c0 6.64-5.35 11.99-12 11.99h-96c-6.64 0-12-5.35-12-11.99v-95.98c0-6.64 5.36-11.99 12-11.99z" fill-opacity=".4"/></g><g stroke-width="9.92746" transform="matrix(.10073078 0 0 .10073078 12.425923 2.256365)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 919.24059 771.67186)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 104.69892 525.90697)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 784.07144 817.24284)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 389.21484 625.67104)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 367.36686 631.05679)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 511.99336 724.73954)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 634.78706 625.67104)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 656.64056 631.05679)"/></g></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

37
icon.svg.import Normal file
View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bfk751s2xwsn3"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

28
project.godot Normal file
View file

@ -0,0 +1,28 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="Godot Chess"
run/main_scene="res://board.tscn"
config/features=PackedStringArray("4.3", "Forward Plus")
config/icon="res://icon.svg"
[editor_plugins]
enabled=PackedStringArray()
[filesystem]
import/blender/enabled=false
[rendering]
renderer/rendering_method="gl_compatibility"