Answered step by step
Verified Expert Solution
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 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 pieces in a row wins. The most wellknown 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 ConnectL The user will be able to play the base game on the regular rows and column board size, but also able to play on sizes with rows and columns between and in size. For example, x is a valid game, and so is by The user will also be able to select the length of pieces in a row needed. This length with be within the limits of long, all the way up to 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 Lshape 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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started