Skip to content

DarioAlbor/TicTacToeChallenge

Repository files navigation

Tic Tac Toe Challenge

This project was generated with Angular CLI version 17.1.1.

We provided some simple Angular template code. Your goal is to create a functioning Tic Tac Toe game. It should work the following way: the first player to go places an X anywhere on the board, and then the next player will be able to place an O, and it continues alternating like this every turn. You should also implement a function to determine if any player won by getting 3 X's or O's in a diagonal, horizontal, or vertical row. If there is a winner, display a message at the top. If nobody wins, then do not display any message. Finally, you should also implement the reset function that resets the entire board. You should also not be able to override the other players move during the game. You are free to add classes and styles, but make sure you leave the component ID's and clases provided as they are.

Tiempo límite:

1 hora

Antes de iniciar la prueba

Antes de iniciar con la solución de la prueba, el candidato debe ejecutar el proyecto y mostrar en pantalla que la plantilla inicial se visualiza en su navegador.

Cómo completar la prueba

Se proporciona el servicio GameService el cual tiene la solución parcial del juego. El candidato deberá completar el código faltante e integrar el servicio con el componente para conseguir los objetivos previamente señalados. Sin embargo, el candidato puede decidir no utilizar la solución parcial que se le proporciona e implementar la suya desde cero.

¿Cómo obtener puntos extras?

El candidato podrá obtener puntos extras si cumple con el objetivo de la prueba y además utiliza alguna o algunas de las características que fueron incorporadas en Angular 16+. También podrá obtener puntos extras si utiliza alguna metodología en la implementación de la hoja de estilos.

Al finalizar

Despúes de la revisión del código y de la funcionalidad, el candidato deberá generar un archivo ZIP con su código fuente y responder el email al representante de la empresa adjuntando el archivo ZIP previamente generado.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.