/4in1

Primary LanguageJavaScript

React App Game 4 in 1 line

Requirements

• The main window of the application shows a game board for a game of “4 in a row”. It contains 7 columns and 6 rows. The game board is initially empty. • The purpose of the game is that 2 players, each in turn, can drop a coin at the top of their column of choice. Each player has his/her own coin color (for example: player 1 red and player 2 yellow). • The game board must clearly show whose turn it is and show this person’s coin color. • When one of the players has at least 4 coins in a row (vertically, horizontally or diagonally) he/she wins the game. This must be shown by means of a clear message. After this, the game ends. • A new game can be started by clicking on the “New Game” button. It must be possible to restart the game even if it is not finished yet, for example because all available places are filled with coins.

Important

This is not an exercise in graphics programming. There is no need to draw rounded coins, etc as long as the game is functional. Of course, nice graphics are always a bonus… • The code will be evaluated on coding style and correctness of the used algorithms, as well as efficiency and creativity. Make sure your code is structured as good as possible. • Desired technical stack: Webpack, React, Redux, TypeScript, Webpack, Unit tests.