raise FrozenGridException
across_data = []
- across_data.append ("<ACROSS PUZZLE>\n")
- across_data.append ("<TITLE>\n")
- across_data.append (title + "\n")
- across_data.append ("<AUTHOR>\n")
- across_data.append (author + "\n")
- across_data.append ("<COPYRIGHT>\n")
- across_data.append (copyright + "\n")
- across_data.append ("<SIZE>\n")
+ across_data.append ("<ACROSS PUZZLE>\r\n")
+ across_data.append ("<TITLE>\r\n")
+ across_data.append (title + "\r\n")
+ across_data.append ("<AUTHOR>\r\n")
+ across_data.append (author + "\r\n")
+ across_data.append ("<COPYRIGHT>\r\n")
+ across_data.append (copyright + "\r\n")
+ across_data.append ("<SIZE>\r\n")
str_size = str (self.cols) + "x" + str (self.rows)
- across_data.append (str_size + "\n")
- across_data.append ("<GRID>\n")
+ across_data.append (str_size + "\r\n")
+ across_data.append ("<GRID>\r\n")
for row in range (self.rows):
for col in range (self.cols):
if (self.data[row][col].occupied_across is True or
across_data.append (self.data[row][col].char)
else:
across_data.append (".")
- across_data.append ("\n")
+ across_data.append ("\r\n")
- across_data.append ("<ACROSS>\n")
+ across_data.append ("<ACROSS>\r\n")
clues_across = self.get_clues_across ()
for word, clue in clues_across:
if clue:
- across_data.append (clue + "\n")
+ across_data.append (clue + "\r\n")
else:
- across_data.append ("(No clue yet)\n")
+ across_data.append ("(No clue yet)\r\n")
- across_data.append ("<DOWN>\n")
+ across_data.append ("<DOWN>\r\n")
clues_down = self.get_clues_down ()
for word, clue in clues_down:
if clue:
- across_data.append (clue + "\n")
+ across_data.append (clue + "\r\n")
else:
- across_data.append ("(No clue yet\n")
+ across_data.append ("(No clue yet\r\n")
acrosslite_str = "".join (across_data)
return acrosslite_str