Giter Club home page Giter Club logo

tic-tac-toe's Introduction

tic_tac_toe

The following challenge was part of a job interview.

The initial commit is the submited code.

Coding Challenge for Frontend Developers

Create a TicTacToe game in Angular 6 or above!

Game mechanics

2 Player can play on the same computer (in the same application). Both players take turns. The app will decide at random which player will go first. In the next game/round, the last rounds loser will go first. If it is a draw, the app decides again. The app should indicate which players turn it is.

Once a player has 3 in a row he wins. If no player achieved 3 in a row and no more moves are possible, it is a draw. The app keeps track of the win count for each player during its life cycle (Once the app reloads it is ok if all the progression is lost).

Programming

  • Create a new Angular project from scratch
  • Implement the game mechanics using a reasonable organization of components and/or services
  • Write a complete unit test for at least one component or service
  • Style the app at your own discretion

My Approach

The board is modelled as a one dimensional array.

For example a classic 3x3 tic-tac-toe game (a draw in this case) would be

['X','O','X',

'X','O','X',

'O','X','O']

The win conditions and board generation support all board sizes greater than 2 by 2 .

tic-tac-toe's People

Contributors

mugrufis avatar emanuelkloess avatar m-reiniger avatar

Stargazers

dandrits avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.