From 7f95db9157e9db37c38d9e3644cafa6f2ccf14ab Mon Sep 17 00:00:00 2001 From: Xuan Trinh <xuan.trinh@student.unimelb.edu.au> Date: Sat, 20 Mar 2021 21:22:35 +1100 Subject: [PATCH] add comment about the format of the position dict --- search/method.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/search/method.py b/search/method.py index 9180ec1..517c09a 100644 --- a/search/method.py +++ b/search/method.py @@ -7,6 +7,19 @@ Read from JSON file: -> load each piece into board's dictionary. -> ensure format token to distinguish between upper and lower. -> handling file IO exception + + format will be : + position_dict = { + "s1" = (row, column), + ... + } + -> for the key: 'c#' + c -character indicate which type it is {rock -> 'r' + ,paper -> 'p' + ,scissor -> 's' + ,block -> ''} + # - number to identify the specific token in the set of token with same type. + start from 1. """ def to_position_list(file): TYPE = 0 -- GitLab