Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE C# 1)Randomly initialize an N by N crossword puzzle with black squares. The grid need not be symmetric like the New York Times crossword.

USE C#

1)Randomly initialize an N by N crossword puzzle with black squares. The grid need not be symmetric like the New York Times crossword.

2)Number the grid as per the two examples given above.

3)Print out the numbers in sequence for the Across and Down clues (without the clues of course).

4)Print out the grid including the black squares and clue numbers.

5)Check whether the grid is indeed symmetric.

Some Helpful Classes

public class Square

{

// Either a part answer (letter) to a clue or a black square public char Value { set; get; }

// Either a clue number or -1 (Note: A black square is always -1)

public int Number { set; get; }

}

public class Puzzle

{

private Square[ , ] grid; // A grid of Squares

private int N; // Size of the crossword

// Create an empty grid of size x size squares (4 marks) public Puzzle (int size) { }

// Randomly initialize a grid with the given number of black squares (4 marks) public void Initialize (int numBlackSquares) { }

// Number the grid (6 marks)

// public void Number ( ) { }

// Print out the numbers for the Across and Down clues (in order) (3 marks) public void PrintClues ( ) { }

// Print out the crossword grid including the black squares and clue numbers (3 marks) public void PrintGrid ( ) { }

// Return true if the grid is symmetric; false otherwise (4 marks) public bool Symmetric ( ) { }

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB.NET Databases

Authors: Thearon Willis

1st Edition

1594864217, 978-1594864216

More Books

Students also viewed these Databases questions