def puzzle_gen():
    global table, WORDS
    WORDS = ['cat', 'bear', 'tiger', 'lion']
    table = [['0' for i in range(10)] for i in range(10)]
    result = create_panel(height=10, width=10, words_value_list=WORDS)

    display_panel(result.get('panel'))
    #convert into 2d array
    for i in range(0, 10):
        for j in range(0, 10):
            table[i][j] = result.get('panel').cells[i, j]
Example #2
0
def puzzle_gen():
    global words, table
    words = ['cat', 'bear', 'tiger', 'lion']
    table = [['0' for i in range(5)] for i in range(5)]
    result = create_panel(height=5, width=5, words_value_list=words)

    display_panel(result.get('panel'))
    #convert into 2d array
    for i in range(0, 5):
        for j in range(0, 5):
            table[i][j] = result.get('panel').cells[i, j]
Example #3
0
 def crear_sopa(self):
     words = [self.entry2.get(), self.entry3.get(), self.entry4.get(), self.entry5.get(), self.entry6.get()]
     ndim = int(self.entry1.get())
     result = create_panel(height=ndim, width=ndim, words_value_list=words)
     print(display_panel(result.get('panel')))
     self.S2.config(state=DISABLED)
Example #4
0
import time

from word_search_puzzle.utils import display_panel
from word_search_puzzle.algorithms import create_panel

words = ['cat', 'dog', 'tiger', 'lion']

table = [['0' for i in range(10)] for i in range(10)]
result = create_panel(height=10, width=10, words_value_list=words)
position = ""
import math

# print('Attempts: {}'.format(result.get('attempts')))
# print('Solution took: {} ms'.format(result.get('elapsed_time')))
display_panel(result.get('panel'))
#print(result.get('panel').cells[0,0])
#print(type(result.get('panel')))

for i in range(0, 10):
    for j in range(0, 10):
        table[i][j] = result.get('panel').cells[i, j]


#
# #print(table[0][0])
# print()
def DFS(row, column, string):
    print("NorthEast:\n", end="")
    DFSsearch(row, column, string, 'NorthEast')
    print("East:\n", end="")
    DFSsearch(row, column, string, 'East')