Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Connect - 4 , two players play a gravity assisted game with a grid board where they take turns dropping their colored piece into

In Connect-4, two players play a gravity assisted game with a grid board where they take turns dropping their colored piece into one of the remaining open columns. The piece falls to the bottom of the column or stops on top of the pile of pieces in the column. To win a typical game, the first player with 4 pieces in a row wins. The most well-known North American version of this game is a blue board with red and yellow pieces, however we will use a yellow board with red and blue pieces.
We will be implementing a flexible version of the game well call Connect-L. The user will be able to play the base game on the regular 6 rows and 7 column board size, but also able to play on sizes with rows and columns between 4 and 8 in size. For example, 4 x 8 is a valid game, and so is 7 by 5. The user will also be able to select the length of pieces in a row needed. This length with be within the limits of 3 long, all the way up to 7 in a row.
The largest change to the game is that instead of just connecting pieces in a row we will be looking for an L-shape where at one end of the line of pieces there will be at least one piece perpendicular to the end of the line. For example. If the win length for how long the line needs to be is 3 then below are some win options. Reminder in a game board the must always be pieces underneath any piece not at the bottom of a column.

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_2

Step: 3

blur-text-image_3

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Knowledge of project management (PMI) teachings

Answered: 1 week ago