mirror of
https://github.com/iritmaximus/haskell.git
synced 2026-10-12 19:13:39 +03:00
Set 9b: mention that the chessboard is square
This commit is contained in:
+4
-4
@@ -10,10 +10,10 @@ import Data.List
|
||||
-- Wikipedia: https://en.wikipedia.org/wiki/Eight_queens_puzzle
|
||||
--
|
||||
-- We'll be working with a two-dimensional coordinate system for indexing the
|
||||
-- queens on a chessboard of arbitrary size. (1,1) represents the top left
|
||||
-- corner. (1,2) is the next square on the top row, (1,3) is the one after that,
|
||||
-- (2,1) is the first square on the second row, (2,2) is the second square in
|
||||
-- the second row, and so on. In general, the coordinates are of the form
|
||||
-- queens on a (square) chessboard of arbitrary size. (1,1) represents the top
|
||||
-- left corner. (1,2) is the next square on the top row, (1,3) is the one after
|
||||
-- that, (2,1) is the first square on the second row, (2,2) is the second square
|
||||
-- in the second row, and so on. In general, the coordinates are of the form
|
||||
-- (row,column). The idea is that the following arrangement of queens on a 8x8
|
||||
-- board will be encoded as the list [(1,8),(2,6),(3,4),(5,7)] of coordinates:
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user