MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / display

Method display

tools/python-3.11.9-amd64/Tools/demo/queens.py:55–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 silent = 0 # If true, count solutions only
54
55 def display(self):
56 self.nfound = self.nfound + 1
57 if self.silent:
58 return
59 print('+-' + '--'*self.n + '+')
60 for y in range(self.n-1, -1, -1):
61 print('|', end=' ')
62 for x in range(self.n):
63 if self.y[x] == y:
64 print("Q", end=' ')
65 else:
66 print(".", end=' ')
67 print('|')
68 print('+-' + '--'*self.n + '+')
69
70def main():
71 import sys

Callers 1

solveMethod · 0.95

Calls 1

printFunction · 0.50

Tested by

no test coverage detected