Skip to content

Commit

Permalink
fix custom branching bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Destaq committed May 5, 2020
1 parent 771fbdc commit c7ff8ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@


def form_values(gammme, depth, fragmentation_percentage, should_defragment, custom_branching):
lst, ratios, kick_depth = new_parser.parse_games(gammme, depth, custom_branching) #whether or not to implement custom branching
"""Create parent, id, labels, and values """
lst, ratios, kick_depth = new_parser.parse_games(gammme, depth, custom_branching) #whether or not to implement custom branching
firstx = [
lst[i][:depth] for i in range(len(lst))
lst[i][:depth+kick_depth] for i in range(len(lst))
] # probably unneeded but for safety's sake...

all_level_moves, exclude_first_moves = [], [] # for parent/labels later
Expand All @@ -26,7 +26,7 @@ def form_values(gammme, depth, fragmentation_percentage, should_defragment, cust

percentage_holder, firstmove = [], []

while counter < depth:
while counter < depth + kick_depth:
counter += 1
othermove = list(
Counter([tuple(firstx[i][kick_depth:counter]) for i in range(len(lst))]).items()
Expand Down
1 change: 0 additions & 1 deletion new_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pgn
import sys


def parse_games(database, depth, custom_branching):
Expand Down

0 comments on commit c7ff8ae

Please sign in to comment.